CSS Filters: Mask Properties

Source: Internet
Author: User
Tags filter definition
The css| Filter Mask property creates a membrane covering the surface for the object. Its expression is also simple:

  filter:mask (color= color)

There is only one color parameter that specifies what color to use as the mask.
Again, let's take a look at the effect of a picture before and after adding the mask attribute (see figure below):

Original

Mask Property Effect Chart

Add the effect of the Mask property as if you were looking at an object with tinted glasses. The code for the effect above is as follows:

  <title> Mask Filter </title>
<style>//* set CSS style start *//
    <!--
div{position:absolute;top:20;left:40;
Filter:mask (color: #666699);
    * Defines the style of the Div area, absolute positioning, the color parameter value of the Mask property to specify what colors to use to mask
Live Object *//
   p{font-family:bailey;font-size:72pt;
Font-weight:bold;color: #FF9900;}
    //* defines the styles within the P region, font name, size, thickness, foreground color *//
    -->
</style>
<body>
<div>
<p> Wenyleaf </p>
</div>
</body>

In fact, even if you remove the definition of the font foreground color in your code, you get the same effect. Because of the definition of the mask attribute, the setting of the font color under its mask has lost its meaning.
There is also a point that needs your attention, the mask attribute to the picture file support is not enough, can not achieve the desired effect.



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.