Source: http://www.study-code.com/html/web-design/79738.htm
You can set the color specified in an object to transparent in the Chroma attribute. Its Expression is as follows:
Filter: Chroma (color = color)
The expression of this attribute is not very simple. It only has one parameter. You only need to set the transparent Color with the Color parameter. For example, the figure below:
- Examples of CSS Filter (4) Chroma attributes
- DropShadow, Chroma, and blur
The figure shows two fonts and two colors. Now we add the chroma attribute to the "leaves" font to make it transparent. The Code is as follows:
<Html>
<Head>
<Title> chroma filter </title>
<Style>
<! --
Div {position: absolute; top: 70; width: 200;
Filter: chroma (color = green )}
// * Define the green color in the DIV range and set the DIV position *//
P {font-family: bailey; font-size: 48; font-weight: bold;
Color: green} // * set the font name, size, width, and color of P *//
Em {font-family: lucida handwriting italic; font-size: 48;
Font-weight: bold; color: rgb (255,51, 153 )}
// * Set the font name, size, width, and color of EM *//
-->
</Style>
</Head>
<Body>
<Div>
<P> LEAVES <em> LOVE </em> </p>
</Div>
</Body>
</Html>
Set the properties of chroma in the code above to make the green transparent. The display effect is as follows:
We can see that the green leaves font is gone, but it is actually transparent. Click the area where it is located under IE and it will still be displayed (SEE ):
In addition, it should be noted that the chroma attribute is not very suitable for image files. Because many images are reduced and compressed (for example, JPG and GIF formats), they are rarely set to transparent at a fixed position.