作家
登录

css 透明度的设置兼容所有浏览器

作者: 来源:www.28hudong.com 2012-11-19 22:36:40 阅读 我要评论

复制代码代码如下: .transparent_class {filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5; opacity: 0.5;} UPDATE: I wanted to pull this post out of the archives and update it a bit because it there seems to be a good amount of interest in this subject. Here is what each of those CSS properties is for: opacity: 0.5; This is the “most important” one because it is the current standard in CSS. This will work in most versions of Firefox, Safari, and Opera. This would be all you need if all browsers supported current standards. Which, of course, they don’t. filter:alpha(opacity=50); This one you need for IE. -moz-opacity:0.5; You need this one to support way old school versions of the Mozilla browsers like Netscape Navigator. -khtml-opacity: 0.5; This is for way old versions of Safari (1.x) when the rendering engine it was using was still referred to as KTHML, as opposed to the current WebKit. 来源:http://css-tricks.com/css-transparency-settings-for-all-broswers/ 这个我就不想翻译了,很简单,我也只是为了做个记录。哈~~~

  推荐阅读

  样式表达式实现交替显示table行颜色

<heand> <mce:style type="text/css"><!-- tr {background-color:expression((this.sectionRowIndex%2==0)?"#419C33":"#CCEBC7")} --></mce:style><style type="text/css" mce_bogus="1">tr {background-col>>>详细阅读


本文标题:css 透明度的设置兼容所有浏览器

地址:http://www.17bianji.com/kaifa2/CSS/16900.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)