ITeye博客

ie6,ie9 css hack

yunmoxue · 2012-02-03 10:19 · css · Web前端 · Markdown

/*ie6 only*/
body{

  _background:blue;

}


/*ie9 only*/
:root body{

  background:gray\0;

}
 

----------ie9-------------------

:root 是 css3的写法

\0 是为了区别其他支持css3的非ie浏览器

\0的写法 ie8,ie9都支持,将来的ie10可能也会支持..谨慎使用..

参考资料:
ie6~ie9 hack 写法

巧用CSS3属性作为CSS hack

IE8的css hack

IE9的css hack

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。