CSS Filter effects and instance analysis

Source: Internet
Author: User

CSS FilterLoaded to the style attribute. style attributes: can be applied to tags, more available and widely used in <Table> <tr> <TD> <body> <center> <input> <font> <form> <frame> <label> <Map>
More importantly, it can be used in tags.Note: The CSS Filter does not work for Firefox.
 

1. Gray filter. effect: make the image black and white
Usage:

Source image: Effect:

 

2. Invert: Apply the filter to reverse image.
Usage:

:
3. The Xray filter function is to make the image produce an x-ray effect.
Usage:
:
4. fliph and flipv
The fliph filter is used to generate a horizontal flip effect; The flipv filter is used to generate a vertical flip effect.
Usage: or : Fliph FilterFlipv Filter 5. Alpha Filter
The Alpha filter is mainly used to process the image transparency.
Usage:
Note: value1 is the transparency value of the image. The value range is 0 (completely transparent )~ 100 (completely opaque)
Value2 is the transparency value at the end of the image transparency transformation. The value range is 0 (completely transparent )~ 100 (completely opaque) Note: This value is valid only when value3 is set.
Value3 is the direction of image transparency conversion. When the value is 1, the transparency of the image changes linearly from left to right. When the value is 2, the transparency of the image changes linearly from inside to outside. When the value is 3, the image transparency changes from the inside to the outside in a rectangle.
Example:
: Alpha filter effect You can adjust the value according to your needs and check the effect.
6. Shadow Filter
The Shadow filter is used to produce shadow effects.
Usage:
Description: value1 indicates the color of the Shadow. For example, 000000 indicates black.
Value2 indicates the illumination angle, for example, 135
Example:

7.wav e Filter
The function of the wave filter is to distort the image.
Usage:
Note: When value1 is set to 1, the original image is added to the processed image. If value1 is set to 0, no value is added.
Value2 is the number of visually distorted Waves
Value3 is the waveform brightness percentage. The value range is 0 ~ 100
Value4 is the initial amount of the Start offset of the sine wave. The value range is 0 ~ 100
Value5 indicates the waveform strength.
Example:

:Wave Filter Effect

 

CSS Filter effect Code instance click to download

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.