使用 CSS 设置遮罩效果

原创
ithorizon 5个月前 (10-19) 阅读数 48 #CSS

使用遮罩效果将透明像素变为指定颜色并使不透明像素透明。此过滤器中使用以下参数

thead>
Sr.否

参数及说明

          1

颜色 strong>

立即学习“前端免费学习笔记(深入)”;

透明区域将变成的颜色。

示例

您可以尝试运行以下代码来实现遮罩效果 -

现场演示

<html>
   <head>
   </head>
   <body>
      <img src="/css/images/logo.png" alt="CSS Logo"   style="max-width:90%">
     
      <p>Text Example:</p>

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

</html>

以上就是使用 CSS 设置遮罩效果的详细内容,更多请关注IT视界其它相关文章!



热门