css透明兼容,alpha兼容

时间:2014-01-29所属栏目: Html+css 来源: 热度:

以前的兼容代码:

.transparent_class { 
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* ie8  */
    filter:alpha(opacity=50);    /* ie5-7  */
    -moz-opacity:0.5;    /* old mozilla browser like netscape  */
    -khtml-opacity: 0.5;    /* for really really old safari */ 
    opacity: 0.5;    /* css standard, currently it works in most modern browsers like firefox,  */
}

现在的兼容

.transparent_class { 
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* ie8  */
    filter:alpha(opacity=50);    /* ie5-7  */
    opacity: 0.5;    /* css standard, currently it works in most modern browsers  */
}

 

标签:
评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)