Home  >  Article  >  Web Front-end  >  Use CSS to set mask effects

Use CSS to set mask effects

WBOY
WBOYforward
2023-09-02 08:13:161206browse

使用 CSS 设置遮罩效果

#Use the mask effect to change transparent pixels to a specified color and make opaque pixels transparent. The following parameters are used in this filter

thead>## 1##ColorExample
Sr.No

Parameters and description

strong>The color that the transparent area will become.

You can try running the following code to achieve the masking effect-

Live Demonstration

<html>
   <head>
   </head>
   <body>
      <img src="/css/images/logo.png" alt="CSS Logo" style="FILTER: Chroma(Color = #000000) Mask(Color=#00FF00)">
     
      <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>

The above is the detailed content of Use CSS to set mask effects. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete
Previous article:CSS flex-wrap propertyNext article:CSS flex-wrap property