ie made us develop something that was a headache in the past. He was different from others. He didn’t support it, and he had something that others didn’t support it. Today I will briefly introduce one of his features - filters.
CSS filters are mainly used to achieve various special effects of images. It has a very magical role in website making. The website can be made more beautiful through CSS filters. In CSS, the filter attribute represents the meaning of the filter, which can set the filter effects of text, pictures and tables.
Syntax: STYLE={filter:filtername(fparameter1,fparameter2...)}
Note: Filtername is the name of the filter, fparameter1, fparameter2, etc. are the parameters of the filter.
13 CSS filter effects
1. Filter: chroma - make special colors transparent.
Syntax: STYLE=filter:Chroma(Color=color)
Tag: color:#rrggbb format, any.
2. Filter:blur-Create a high-speed movement effect, that is, a blur effect.
Syntax: STYLE=filter:Blur(Add=add,Direction=direction,Strength=strength)
Note: Add: Generally 1, or 0; Direction: angle, 0-315 degrees, step length is 45 degrees; Strength: The value of the effect growth, usually 5.
3. Filter: FlipV--create vertical mirror image.
Syntax: STYLE=filter:FlipV
4. Filter: alpha--set transparent hierarchy
Syntax: STYLE=filter:Alpha(Opacity=opacity,FinishOpacity=finishopacity,Style=style,StartX=startX,StartY=startY,FinishX=finishX,FinishY=finishY)
Note: Opacity: Start value, the value is 0-100, 0 is transparent, 100 is the original image; FinishOpacity: Target value; Style: 1 or 2 or 3; StartX: any value; StartY: any value
5. Filter: FlipH - Create a horizontal mirror image.
Syntax: STYLE=filter:FlipH
6. Filter:glow--add glory outside the edge of nearby objects.
Syntax: STYLE=filter:Glow(Color=color,Strength=strength)
Label: Color: luminous color; Strength: intensity (0-100)
7. Filter:mask--create transparent mask on the object.
Syntax: STYLE=filter:Mask(Color=color)
8. Filter: Filter: Xray-Make the object look like it is illuminated by X-ray.
Syntax:STYLE=filter:Xray
9. Filter: invert-invert color.
Syntax:STYLE=filter:Invert
10. Filter: DropShadow -- Creates a fixed shadow of an object.
Syntax: STYLE=filter:DropShadow(Color=color,OffX=offX,OffY=offY,Positive=positive)
Label: Color:#rrggbb format, arbitrary; Offx: X-axis deviation value; Offy: Y-axis deviation value; Positive: 1 or 0.
11. Filter:gray-grays the picture.
Syntax:STYLE=filter:Gray
12. Filter: wave-rippling effect.
Syntax: filter:Wave(Add=add,Freq=freq,LightStrength=strength,Phase=phase,Strength=strength)
Note: Add: generally 1, or 0; Freq: deformation value; LightStrength: deformation percentage; Phase: angle deformation percentage; Strength: deformation strength.
13.shadow--create offset fixed shadow.
Syntax: filter:Shadow(Color=color,Direction=direction)
Label: Color:#rrggbb format; Direction: Angle, 0-315 degrees, step size is 45 degrees.
When using CSS filters, one thing you should note is that in the current website production layout, filters are often attached to the div. If you simply set an id for the div in the html code, the filter will not work. This id attribute must be defined in style or css, otherwise it will not work.
Just one sentence of code is required, and the pictures can be switched freely like PPT documents when creating a website. It’s very simple! Before converting, we need to understand three basic codes:
Rotation: style=filter: progid: DXImageTransform.Microsoft.BasicImage(rotation:1)
Remove background color: style=filter:Chroma(Color=#000000)
Set gradient color: style=position:relative;left:0px;top:0px;filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#ff0000, endcolorstr=#ffff00,gradientType=1)
Wonderful review: A complete collection of CSS filter effects for website production
Below is a complete collection of picture conversion filters, I hope it can help friends~! ! !
Random transformation: progid:DXImageTransform.Microsoft.RevealTrans(enabled=true,transition=23)
Square gradient: progid: DXImageTransform.Microsoft.Iris(irisstyle=square,motion=in)
Square is getting bigger: progid: DXImageTransform.Microsoft.Iris(irisstyle=square,motion=out)
Cross-smashing: progid:DXImageTransform.Microsoft.Iris(irisstyle=cross,motion=in)
Cross-dive: progid:DXImageTransform.Microsoft.Iris(irisstyle=cross,motion=out)
Star shape is getting bigger: progid: DXImageTransform.Microsoft.Iris(irisstyle=star,motion=out)
Star shape gradually smaller: progid: DXImageTransform.Microsoft.Iris(irisstyle=star,motion=in)
The circle is getting bigger: progid:DXImageTransform.Microsoft.Iris(irisstyle=circle,motion=out)
Circle gradually smaller: progid: DXImageTransform.Microsoft.Iris(irisstyle=circle,motion=in)
Diamond shape gradually smaller: progid: DXImageTransform.Microsoft.Iris(irisstyle=diamond,motion=in)
The diamond is getting bigger: progid: DXImageTransform.Microsoft.Iris(irisstyle=diamond,motion=out)
The plus sign is getting bigger: progid: DXImageTransform.Microsoft.Iris(irisstyle=plus,motion=out)
The plus sign gradually becomes smaller: progid: DXImageTransform.Microsoft.Iris(irisstyle=plus,motion=in)
Upward erase: protocol:DXImageTransform.Microsoft.Blinds(bands=1,direction=up)
Erase down: protocol:DXImageTransform.Microsoft.Blinds(bands=1,direction=down)
Erase left: protocol:DXImageTransform.Microsoft.Blinds(bands=1,direction=left)
Erase to the right: protocol:DXImageTransform.Microsoft.Blinds(bands=1,direction=right)
Retract from left and right middle: progid: DXImageTransform.Microsoft.Barn(motion=in, orientation=vertical)
Random Dissolve: progid:DXImageTransform.Microsoft.RandomDissolve(enable=true)
Central area is expanded up and down: progid:DXImageTransform.Microsoft.Barn(motion=out, orientation=horizontal)
Expand left and right in the middle: progid:DXImageTransform.Microsoft.Barn(motion=out, orientation=vertical)
Random horizontal line: progid:DXImageTransform.Microsoft.RandomBars(orientation=horizontal)
Random vertical line: progid:DXImageTransform.Microsoft.RandomBars(orientation=vertical)
Upper and lower middle shrinkage: progid: DXImageTransform.Microsoft.Barn(motion=in, orientation=horizontal)
Standard gradient conversion: BlendTrans(enabled=true, percent=10)
Adjustable gradient conversion: progid:DXImageTransform.Microsoft.Fade(enabled=ture,overlap=1.0)
Insert to the bottom right: protocol:DXImageTransform.Microsoft.Inset(enabled=ture)
Hide stretch: progid:DXImageTransform.Microsoft.Stretch(stretchstyle=hide)
Progid: DXImageTransform.Microsoft.Stretch(stretchstyle=push)
Rotary stretch: progid:DXImageTransform.Microsoft.Stretch(stretchstyle=spin)
Anti-clock: progid:DXImageTransform.Microsoft.RadialWipe(wipestyle=wedge)
Radiation rays: progid: DXImageTransform.Microsoft.RadialWipe(wipestyle=radial)
Mosaic effect: progid:DXImageTransform.Microsoft.Pixelate(maxSquare=20)
Clock: progid:DXImageTransform.Microsoft.RadialWipe(wipestyle=clock)
Lower left of the ladder: progid:DXImageTransform.Microsoft.Strips(motion=leftdown)
Top right of the ladder: progid:DXImageTransform.Microsoft.Strips(motion=rightup)
Top left of the ladder: progid:DXImageTransform.Microsoft.Strips(motion=leftup)
Lower right of the ladder: progid:DXImageTransform.Microsoft.Strips(motion=rightdown)
Spiral shrinkage: progid:DXImageTransform.Microsoft.Spiral(gridSizeX=20,gridSizeY=20)
Windmill rotation: progid: DXImageTransform.Microsoft.Wheel(spokes=20)
Z-shaped twists: progid: DXImageTransform.Microsoft.Zigzag(gridSizeX=20,gridSizeY=20)
HBlinds: progid: DXImageTransform.Microsoft.Blinds(bands=6,direction=down)
:progid:DXImageTransform.Microsoft.Blinds(bands=6,direction=up)
:progid:DXImageTransform.Microsoft.Blinds(bands=60,direction=down)
:progid:DXImageTransform.Microsoft.Blinds(bands=60,direction=up)
V blinds: progid: DXImageTransform.Microsoft.Blinds(bands=6,direction=right)
:progid:DXImageTransform.Microsoft.Blinds(bands=6,direction=left)
:progid:DXImageTransform.Microsoft.Blinds(bands=60,direction=right)
:progid:DXImageTransform.Microsoft.Blinds(bands=60,direction=left)
Switched slide: progid:DXImageTransform.Microsoft.Slide(slidestyle=swap,bands=1)
:progid:DXImageTransform.Microsoft.Slide(slidestyle=swap,bands=20)
Push slide: progid:DXImageTransform.Microsoft.Slide(slidestyle=push,bands=1)
:progid:DXImageTransform.Microsoft.Slide(slidestyle=push,bands=20)
Hide slide: progid:DXImageTransform.Microsoft.Slide(slidestyle=hide,bands=1)
:progid:DXImageTransform.Microsoft.Slide(slidestyle=hide,bands=20)
Fuzzy advancement: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.5,wipestyle=0,motion=forward)
:progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.5,wipestyle=0,motion=reverse)
:progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.5,wipestyle=1,motion=forward)
:progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.5,wipestyle=1,motion=reverse)
Vertical chessboard: progid:DXImageTransform.Microsoft.CheckerBoard(direction=right,squaresX=12,squaresY=12)
:progid:DXImageTransform.Microsoft.CheckerBoard(direction=left,squaresX=12,squaresY=12)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=right,squaresX=2,squaresY=2)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=left,squaresX=2,squaresY=2)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=right,squaresX=60,squaresY=60)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=left,squaresX=60,squaresY=60)
Horizontal chessboard: progid:DXImageTransform.Microsoft.CheckerBoard(direction=down,squaresX=12,squaresY=12)
:progid:DXImageTransform.Microsoft.CheckerBoard(direction=up,squaresX=12,squaresY=12)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=down,squaresX=2,squaresY=2)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=up,squaresX=2,squaresY=2)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=down,squaresX=60,squaresY=60)
:progid:DXImageTransform.Microsoft.Checkerboard(direction=up,squaresX=60,squaresY=60)