如何在没有任何内联 css 的情况下更改离子图标的颜色?

How to change the color of the ion icon without any inline css?

我想将颜色更改为白色。我也尝试使用 color:light,但没有成功。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
    <title>Document</title>
</head>
<body>
    <ion-icon name="arrow-back-outline"></ion-icon>
    <style>
        ion-icon {
  color:blue;
}
    </style>
</body>
</html>

CSS 101:如果您希望颜色为白色,请将其设置为 White,或设置任何颜色 w3schools: CSS colors 之一或使用十六进制:color: #xxxxxx(白色 = #ffffff)或类似 color: rgba(r,g,b,a)(白色:rgba(255,255,255,1) 使用 'a' 作为 alpha 值)。

再次:w3schools: CSS color Property 提供相关信息。

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
  <title>Document</title>
</head>

<body>
  <ion-icon name="arrow-back-outline"></ion-icon>
  <style>
    ion-icon {
      color: White;
      background-color: Black;
    }
  </style>
</body>

</html>