您现在的位置:首页 >> 前端 >> 内容

IE CSS hack

时间:2012/12/25 8:18:33 点击:

  核心提示:IE系列的常见的Hack技术总结起来就一句话针对特定版本的IE写特定的的样式,该样式在指定版本的IE以外无法被正确解析。#ml10 {margin-left:10px;margin-left:10px...
IE系列的常见的Hack技术总结起来就一句话——针对特定版本的IE写特定的的样式,该样式在指定版本的IE以外无法被正确解析。

 

#ml10 {

    margin-left:10px;

    margin-left:10px !important; /* Firefox、IE7+支持 */

    _margin-left:10px           /* IE6支持 */

    *margin-left:10px           /* IE6、IE7支持 */

    *+margin-left:10px          /* IE7支持 */

    margin-left:10px\9;         /* IE6、IE7、IE8支持 */

    margin-left:10px\0;         /* IE8支持 */

}

另外,还有其他写法,比如:

 

*html #ml10{

 

}

*+html #ml10{

 

}

Tags:IE EC CS SS 
作者:网络 来源:不详