The Mask attribute creates a film covering the surface for the object. Its expression is also simple:
Filter: Mask (Color = Color)
Only one Color parameter is used to specify the Color used as the mask.
Similarly, let's take a look at the effect of an image before and after adding the mask attribute (see the figure below ):
The effect of adding the MASK attribute is like watching objects with colored glasses. The code for the above effect is as follows:
The code is as follows: |
Copy code |
<Html> <Head> <Title> mask filter </title> <Style> // * Set the CSS style to start *// <! -- Div {position: absolute; top: 20; left: 40; Filter: mask (color: #666699 );} // * Defines the style of the DIV area and absolute positioning. The color parameter value of the mask attribute specifies the color used for masking. Living object *// P {font-family: bailey; font-size: 72pt; Font-weight: bold; color: # FF9900 ;} // * Define the style in area P, font name, size, width, and foreground color *// --> </Style> </Head> <Body> <Div> <P> wenyleaf </p> </Div> </Body> </Html>
|
In fact, you can get the same effect even if you remove the definition of the font foreground color in the code. With the definition of the Mask attribute, the font color settings under the Mask have no meaning.
Note that the support of the mask attribute for image files is not enough to achieve the expected effect.