![CSS Transparency – A Detailed overview CSS Transparency – A Detailed overview](https://www.script-tutorials.com/demos/50.png)
![CSS透明度–详细概述 CSS Transparency – A Detailed overview](https://www.script-tutorials.com/demos/50.png)
CSS Transparency – full overview Today we will talk about CSS. And our article will about – how to make elements transparent. Proceeding from my experience I can tell that today we don`t have any cross-browser solution to apply transparency for objects. Each browser has own idea about a transparency. I will tell about all these methods in details, for each of browsers.
CSS透明度–完整概述今天我们将讨论CSS。 我们的文章将探讨–如何使元素透明。 从我的经验可以看出,今天我们没有任何跨浏览器解决方案可以为对象应用透明性。 每个浏览器对于透明性都有自己的想法。 我将针对每种浏览器详细介绍所有这些方法。
First method – using opacity property. This property has appeared in CSS3 and is at present supported by the majority of browsers (Firefox, Netscape 7, Safari, Opera 9). As value – value of a transparency from 0.0 (fully transparent) to 1.0 (fully opaque).
第一种方法–使用不透明度属性。 此属性已出现在CSS3中,目前受大多数浏览器(Firefox,Netscape 7,Safari,Opera 9)支持。 作为值–透明度的值,范围从0.0(完全透明)到1.0(完全不透明)。
Example:
例:
![jpg image jpg image](https://www.script-tutorials.com/demos/50/globe.jpg)
![png image png image](https://www.script-tutorials.com/demos/50/lens.png)
![jpg图像 jpg image](https://www.script-tutorials.com/demos/50/globe.jpg)
![png图像 png image](https://www.script-tutorials.com/demos/50/lens.png)
Unfortunately it doesn’t work in Internet Explorer till now. To use a transparency in IE we should use filters, like filter:alpha(opacity=60);. Values vary from 0(fully transparent) to 100(fully opaque).
不幸的是,到目前为止,它在Internet Explorer中不起作用。 要在IE中使用透明度,我们应该使用过滤器,例如filter:alpha(opacity = 60); 。 值的范围从0(完全透明)到100(完全不透明)。
Example of using: