CSS Filter Application Tips

Source: Internet
Author: User
Tags add filter insert
Css| Technique | filter

Friends who often make Web pages must all know CSS, CSS is the abbreviation of cascading style sheet, usually people call it "style sheet" or "cascading style". Its function is very comprehensive, from the text, pictures, paragraphs to the entire Web page has its strengths, today we say that the filter effect in CSS.

When we do the Web page, the image processing is mostly Photoshop and other graphics processing software, in fact, in the CSS with a lot of filters, the rational application of these filters you can also make the above software to make the effect. Let me take a look at the filter application in the CSS from the example below.

Picture atomization

Code:

1. Internal Insert Type

Insert between 〈head〉 and 〈/head〉 :

〈style type = text/css〉
. Fog{filter:alpha (opacity=100,style=2)}
〈/style〉

Then add class= "Fog"to the Picture property code.

Note: Insert code between 〈head〉 and 〈/head〉 fog has one before. "(not including quotes), please be sure not to miss it."

2. Direct Insertion Type

In the Picture property code, add:

Style= "Filter:alpha (opacity=100,style=2)"

The effect is shown in Figure 1.


Figure 1

Features: by using the "alpha" filter of CSS, you can make a picture atomization effect.

extension:"style" parameter: "0" no Progressive, "1" Straight line progressive, "2" circular Progressive, "3" rectangle progressive; the parameter "opacity" is a percentage of opacity.

Picture weathering

Code:

1. Internal Insert Type

Insert between 〈head〉 and 〈/head〉 :

〈style type = text/css〉
. Wind{filter:blur (STRENGTH=10)}
〈/style〉

Then add class= "Wind"to the picture attribute code(note "."). Number).

2. Direct Insertion Type

In the Picture property code, add:

Style= "Filter:blur (strength=10)"

The effect is shown in Figure 2.


Figure 2

Features: by using the CSS blur filter, the picture has a wind-blown blur 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.