Home >Web Front-end >HTML Tutorial >CSS sets the transparency of div elements_html/css_WEB-ITnose

CSS sets the transparency of div elements_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:56:561016browse

In IE, "opacity" needs to be defined through "filter", while in Mozilla, "opacity" can be parsed directly, so if you want this effect to be supported in both browsers, you need Add both settings.

.div {     filter:alpha(opacity=50);/*IE*/     opacity:0.5;/*Mozilla*/}

Use the following style sheet to define your div to have various transition effects. .alpha is the class of div. A UI front-end framework carefully developed for 5 years!


.alpha { filter: alpha(Opacity=50, FinishOpacity=50, Style=0, StartX=0, StartY=0, FinishX=100, FinishY=100}
Explanation:
Opacity=Starting opacity (it will not be transparent if it is 100)
FinishOpacity=Ending opacity (it will not be transparent if it is 100)
Style=Style, starting from 0, 1.2.3.... Yes Uniformly transparent, radial shape is transparent...
StartX=X coordinate where transparency starts, basically the upper left corner (0) of the picture or layer
StartY=Y coordinate where transparency starts, basically also the picture , the upper left corner of the layer (0)
FinishX = the X coordinate of the end of transparency, basically the lower right corner of the picture, layer (width of the picture, layer)
FinishY = the Y coordinate of the end of transparency, basically also The lower right corner of the image and layer (the height of the image and layer)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn