The css| filter Chroma property can set the color specified in an object as a transparent color, and its expression is as follows:
Filter:chroma (Color=color)
The expression of this property is not simple, it has only one argument. Just use the color parameter to set the colors you want to specify to be transparent. For example, the following picture:
The figure shows two fonts, two colors, and we now add the Chroma property to the "leaves" font to make it transparent. The code is as follows:
<title>chroma filter</title>
<style>
<!--
div{position:absolute;top:70;width:200;
Filter:chroma (Color=green)}
//* defines a div-wide green as a transparent color, and sets the position of the div in addition *//
P{font-family:bailey;font-size:48;font-weight:bold;
Color:green} //* set P's font name, size, weight, color *//
Em{font-family:lucida handwriting italic;font-size:48;
Font-weight:bold;color:rgb (255,51,153)}
//* Sets the font name, size, weight, and color of EM *//
-->
</style>
<body>
<div>
<p>leaves <em>LOVE</em></p>
</div>
</body>
Make the green transparent by setting the Chroma property in the code above. The display effect is as follows:
We see the green leaves font is missing, in fact it is transparent, in IE click on its area, it will still show (see figure below):
Also, it is important to note that the Chroma property is not suitable for picture files. Because many of the pictures are subtractive and compressed (such as JPG, GIF, etc.), they rarely have a fixed position to be set to transparent.