星空网 > 软件开发 > 网页设计

各大浏览器hack

IE6  : " *"_“下划线格 :myclass  {_background:red;}

"*"星号:格式:.myclass{*background:red;}

IE7 : " * “星号格式:.myclass{*background:red;}

           *+html  格式: *+html .myclass{background:red;}

             + 格式: .myclass{+background: red;}

           !important  格式: .myclass{background:red !important;}

IE8 : \0 格式:.myclass{background:red\0;}/*是留给ie8的,最新版opera也认识,后面自有hack写了给opera认的,所以,\0我们就认为是给ie8留的;*/

IE9 :  \9\0 è格式:.myclass{background:red\9\0;}

            :root加\9 è格式::root .myclass{background:red\9;}

IE10 :  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { 

   /* IE10-specific styles go here */ }

Firefox : @-moz-document url-prefix() { .font1 {color:red} } /*针对Firefox浏览器的写法*/

Opera :@media all and (min-width:0px){ #test {background-color:black\0;} } 这个是老是跟ie抢着认\0的神奇的opera,必须加个\0,不然firefox,chrome,safari也都认识。。。

chrome/Safari : @media screen and (-webkit-min-device-pixel-ratio:0){ #test {background-color:gray;} }最后这个是浏览器新贵chrome和safari的。

总结:         1、IE6、IE7都支持 *,但IE8终于回归正统,放弃了对*的支持

                  2、IE7、IE8、Firefox、Opera、Safari都支持!important

                  3、浏览器优先级别:FF<IE7<IE6,CSS hack,遵循书写顺序一般为FF IE7 IE6

                  4、 ie9的hack目前ie10也适合




原标题:各大浏览器hack

关键词:浏览器

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

去越南的快递:https://www.goluckyvip.com/tag/105698.html
邮寄越南的快递:https://www.goluckyvip.com/tag/105699.html
twitter12:https://www.goluckyvip.com/tag/1057.html
俄罗斯电商:https://www.goluckyvip.com/tag/10570.html
中国可以快递越南吗:https://www.goluckyvip.com/tag/105700.html
快递到越南要多久:https://www.goluckyvip.com/tag/105701.html
武陵山大裂谷周围景点 武陵山大裂谷周围景点图片:https://www.vstour.cn/a/411233.html
南美旅游报价(探索南美洲的旅行费用):https://www.vstour.cn/a/411234.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流