CSS Filter: Chroma attribute

Source: Internet
Author: User
Tags transparent color

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:

<Title> chroma filter </title>
<! --
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 *//
<P> LEAVES <em> LOVE </em> </p>

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.