CSS Filter attributes (image transparency)

Source: Internet
Author: User

Used to customize the Image Display Effect

1) valid HTML tags of filters:

Body

Button

Div

IMG

Input

Marquee

Span

Table

TD

Textarea

Th

Tr

2) filter attribute Parameters

A)Set transparency alpha  

Syntax: {filter: alpha (opacity = N1, finishopacity = n2, style = #, startx = x1, starty = Y1, finishx = x2, finishy = Y2 )}
"Opacity" transparency. from 0 to 100, 0 indicates completely transparent. Indicates completely opaque.
"Finishopacity" (optional) specifies the transparency between. 0 and 100 at the end.
"Style" Transparent area shape. Where # Can Be: 0 represents a unified shape, 1 linear, 2 radial, 3 rectangular.
Start X and Y coordinates of the gradient transparency effect "startx" and "starty.
"Finsihx" and "finsihy" gradient transparency ends the coordinates of X and Y.
<! -- [If! Supportlinebreaknewline] -->
<! -- [Endif] -->

B)FuzzyBlur

Syntax: {filter: blur (add = add, direction = direction, strength = strength )}
"Add" "true (default)" or "false". specifies whether the image is changed to the fuzzy effect of the image. 1 is true, 0 is false
"Direction" sets the blur Direction. 0 vertical up, every 45 degrees is a unit. The default value is 270 degrees to the left.
The width of "strength" pixels is blurred. The default value is 5 pixels.

 

C)TransparentChroma

Set the specified color to transparent
Syntax: {filter: chroma (color = color )}

Color, set to the value of the transparent color

Example:

D)Projection shadow

Syntax: {filter: dropshadow (color = color, offx = x, offy = Y, positive = positive )}
"Color" shadow color
"Offx" and "offy" are the offsets of shadows in the X and Y directions.
"Positive" if "true" is used to create a visible projection for any non-transparent pixel. If it is "false", a visible projection is created for the transparent pixel part.

E)Flip fliph and flipv  

Syntax: {filter: fliph}, {filter: flipv}

Reverse the object horizontally and vertically.

F)The light effect glow is added to the outer boundary of the object. 

Syntax: {filter: glow (color = color, strength = n )}

"Color" Luminous color
"Strength" intensity from 1 to 255

G)Image Color Conversion

Gray-scale invert reversed Xray reflects the image contour and brightens these contours (X-ray effect, gray-scale reversed)
Syntax: {filter: Gray} {filter: Invert} {filter: Xray}

H)Shadow  

Syntax: {filter: Shadow (color = color, direction = direction )}
Color Projection Color
Direction projection. 0 degrees vertical up, then every 45 degrees is a unit. The default value is 270 degrees to the left.

I)Sine Wave  

Use sine ripple on the X and Y axes to disrupt the image

Syntax: {filter: Wave (add = true/false, freq = N, lightstrength = N1, phase = n2, strength = N3 )}
"Add" indicates whether to disturb. The default value is "true ".
How many complete ripple does "freq" generate.
"Lightstrength" enhances light and shade, an integer between 0 and.
The offset of the "phase" sine wave. The value ranges from 0.
"Strength" indicates the amplitude.

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.