使用 CSS 滤镜实现辉光效果

cssweb developmentfront end technology更新于 2025/9/9 0:12:17

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

此滤镜中可使用以下参数 −

S.no
参数 &描述
1.
Color
您想要的辉光颜色。
2.
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>

相关文章


有用资源