IE filter-CSS Filters

Source: Internet
Author: User
Tags transparent image

CSS filters are a great way to add effects to text, images and other aspects of a webpage without having to make special graphics. filters only work on Internet Explorer 4.0 +, and only work on text if height and width are specified. some of them only work on an image if it has transparent parts.

Below are the details for each of the filters.

Alpha
Alters the opacity of the object, which makes it blend into the background.

Alpha <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: alpha (opacity = 100, finishopacity = 0, style = 1, startx = 0, starty = 0, finishx = 200, finishy = 0) "> alpha </span>

Opacity Level of the opacity. 0 is fully transparent, 100 is fully opaque.
Finishopacity Level of the opacity at the other end of the object.
Style The shape of the opacity gradient.

0 = uniform
1 = Linear
2 = radial
3 = rectangular

Startx X coordinate for opacity gradient to begin.
Starty Y coordinate for opacity gradient to begin.
Finishx X coordinate for opacity gradient to end.
Finishy Y coordinate for opacity gradient to end.
Blur
Motion blurs your object with the direction and strength specified. An interesting Mouseover effect for your links!

Blur <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: blur (add = 0, direction = 200, strength = 5) "> blur </span>

Add True or false. If true, the image is added to the blurred image; if false, the image is not added to the blurred image.
Direction The direction of the Blur, going clockwise, rounded to 45-degree increments. The default value is 270 (left ).

0 = Top
45 = Top right
90 = right
135 = bottom right
180 = bottom
225 = bottom left
270 = left
315 = top left

Strength The number of pixels the Blur will extend. The default is 5 pixels.
Chroma
Makes a specific color transparent. Usually used with images, and it works with scrollbars and backgrounds.

Chroma <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: chroma (color = #000000) "> chroma </span>

Color The color that you 'd like to be transparent.
Dropshadow
Creates a shadow of your object at the specified X (horizontal) and Y (vertical) offset and color.

Drop <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: dropshadow (color = #9bad71, offx = 5, offy = 5) "> shadow </span>

Color The color, in # rrggbb format, of the dropshadow.
Offx Number of pixels the drop shadow is offset from the visual object, along the x-axis. Positive Integers move the drop shadow to the right, negative integers move the drop shadow to the left.
Offy Number of pixels the drop shadow is offset from the visual object, along the y-axis. Positive Integers move the drop shadow down, negative integers move the Drop Shadow up.
Positive If true, all opaque pixels of the object have a dropshadow. If false, all transparent pixels have a dropshadow. The default is true.
Fliph
Creates a horizontal mirror image of the object.

Fliph <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: fliph "> fliph </span>

Flipv
Creates a vertical mirror image of the object.

Flipv <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: flipv "> flipv </span>

Glow
Creates a glow around the object. If it's a transparent image, the glow is created around the opaque pixels of it.

Glow <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: glow (color = #9bad71, strength = 7) "> glow </span>

Color The color you want the glow to be.
Strength The intensity of the glow (from 1 to 255 ).

Grayscale
Converts the colors of the object to 256 shades of gray.

Grayscale <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: gray "> grayscale </span>

Invert
Maps the colors of the object to their opposite value in the color spectrum; a "negative ."

Invert <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: # cc0000; font-weight: bold; filter: invert "> invert </span>

Mask
Turns transparent pixels to a specified color and makes opaque pixels transparent.

Mask <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: mask (color = #000000) "> mask </span>

Color The color that the transparent areas will become.
Shadow
Creates an attenuated shadow in the direction and color specified. It's a cross between dropshadow and glow.

Shadow <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: shadow (color = #9bad71, direction = 225) "> shadow </span>

Color The color that you want the shadow to be.
Direction The direction that you want the shadow to go in, expressed in terms of degrees clockwise from vertical. The default is 225 degrees (bottom left ).

0 = Top
45 = Top right
90 = right
135 = bottom right
180 = bottom
225 = bottom left
270 = left
315 = top left

Wave
Gives the object a sine wave distortion to make it look Wavey.

Wave <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: wave (add = 0, freq = 1, lightstrength = 20, phase = 100, strength = 10) "> wave </span>

Add A value of 1 adds the original image to the waved image, 0 does not.
Freq The number of waves.
Light The strength of the light on the wave (from 0 to 100 ).
Phase At what degree the sine wave shoshould start (from 0 to 100 ).
Strength The intensity of the wave effect.

Xray
Grayscales and flattens the color depth.

Xray <Span style = "width: 50; Height: 20; font-size: 20px; font-family: verdana; color: #000000; font-weight: bold; filter: xray "> Xray </span>
One last thing. You can use multiple filters on the one object to create some really interesting effects:

like this like this
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.