CSS透明度–详细概述

CSS Transparency – A Detailed overview
CSS Transparency – A Detailed overview

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:

例:

First sample using ‘opacity’ css property to set transparency
第一个使用“ opacity” css属性设置透明度的示例

jpg image
png image

jpg image
png image

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:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值