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)}
* Define DIV range green to transparent color, and set div position *//
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)}
* Set EM font name, size, weight, color *//
-->
</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 that the green leaves font is gone, it is actually transparent, and it will show up in the area where it is located (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.