CSS3 Filter (filter)

Source: Internet
Author: User

2015-12-20 17:05:13

    • CSS3 Filter Filter effect ....

CSS3 Filter filter effect, filter is the CSS Filter Effect 1.0 defined in the filter effect, a use of CSS to change the image of the blur, brightness, contrast, saturation, and so on the effect of filters.

The code in Index.html is as follows:


The styles in Style.css are set to:

Where the Background-attachment property is used to define how the background picture moves with the scroll axis, value: Scroll | Fixed | Inherit

    • Scroll: As the scroll axis background picture of the page will move;
    • Fixed: The background picture will not move with the scroll axis of the page;
    • Inherit: Inherits the property settings of the parent class;

The following will formally enter the display of the filter filter effect:

(1) Filter:blur (degree of ambiguity)

Add the Filter property to the Style.css file:

Blur (Blur), the larger the value, the more blurred the picture becomes, as shown in the following:

Original

(2) filter:brightness (brightness)

Brightness value from ( -1~1), the larger the value, the greater the brightness, the effect is compared as follows:

Original

(3) filter:saturate (saturation)

Saturation is 100% as the middle value, saturation is greater than 100%, saturation is less than 100%, as follows:

Saturation is 30% saturation of 150%

(4) Filter:sepia (nostalgia)

Filter:sepia (100%); the parameter range (0%~100%) effect is compared as follows:

Original

(5) Filter:grayscale (grayscale)

Filter:grayscale (50%); (Parameter range 0%~100%), the effect is compared as follows;

Original

(6) Filter:invert (Reversed phase)

Filter:invert (80%); parameter setting range (0%~100%), as follows:

Original

(7) Filter:hue-rotate (hue)

The values range from 0 degrees to 360 degrees, with the following effects:

Original

(8) Filter:contrast (contrast), 100% is the median value

The effect is as follows:

Original
At this point, filter all the parameters of the effect has been introduced, we hope to help.

CSS3 Filter (filter)

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.