css的hack详解
.test{
background: #f00; /*各浏览器都认识,主要给高级浏览器用*/
background: blue\0; /*ie10、9、8*/
background: red\9; /*所有的 ie*/
background:#F60\0\9; /*\0\9 或 \9\0 IE8*/
+background: yellow; /*ie7、6 +号同*号 */
_background:black; /*ie6*/}
:root .test{background: blue\9;} /*ie9*/
background:#f00; 各浏览器都认识,主要给高级浏览器用
background: blue\0; 网上说是给IE8的,不过经过测试,IE10、9、8都认识他。
background: red\9; 这个东西好玩了,所有的ie都认识他。
background:#F60\0\9; 这个东西是给IE8 玩的
+background: yellow; *或+ 留给了IE7、6 这一点还是不错的
_background:black; _专门留给神奇的ie6
:root .test{background:blue\9;} :root是给ie9的,网上流传了个版本是 :root #test { background:blue\0;},新版opera也认识,所以经过反复验证最终ie9特有的为:root 选择符 {属性\9;}