IE css hack

1.IE6~IE10 hack

.dome{
    color: yellow;  /*W3C*/
    color: red9;   /*IE6-IE10*/
    color:yellow9;   /*IE9-IE10*/
    *color:orange;  /*IE6-IE7*/
    +color:blue;    /*IE7*/
    _color:green;   /*IE6*/
}

2.IE8 hack 方法一 (排除法)css样式书写顺序很重要,不可以乱

.dome1{
    color: yellow;  /*W3C*/
    color: red9;   /*IE6-IE10*/
    color:yellow9;   /*IE9-IE10*/
    *color:yellow;  /*IE6-IE7*/
}

3.IE8 hack 方法二 (@media媒介查询)css样式书写顺序很重要,不可以乱

.dome2{
    color: yellow;  /*W3C*/
    color: red9;   /*IE6-IE10*/
    *color:yellow;  /*IE6-IE7*/
}
@media screen and (min- 0px){
    /* IE9+ ~ chrome */
    .dome2{
        color: yellow;
    }
}
原文地址:https://www.cnblogs.com/ysxq/p/6022223.html