使用 CSS 在对象周围创建辉光

cssweb developmentfront end technology更新于 2025/9/8 23:08:17

辉光效果用于在对象周围创建辉光。如果是透明图像,则会在其不透明像素周围创建辉光。

此滤镜可使用以下参数

参数
描述
Color
您想要的光晕颜色。
Strength
辉光强度(范围:1 到 255)。

示例

您可以尝试运行以下代码,在对象周围创建辉光。

<html>
   <head>
   </head>

   <body>
      <img src="/css/images/logo.png" alt="CSS Logo" style="Filter: Chroma(Color = #000000) Glow(Color=#00FF00, Strength=20)">

      <p>Text Example:</p>

      <div style="width: 357;
         height: 50;
         font-size: 30pt;
         font-family: Arial Black;
         color: red;
         Filter: Glow(Color=#00FF00, Strength=20)">CSS Tutorials</div>
   </body>

</html>

相关文章


有用资源