How to give Internet Explorer different CSS lines?

前端 未结 4 1284
南笙
南笙 2021-01-26 08:21

Imagine I\'m having a DIV. I want to display it in a row with other divs, so I\'m giving it display: inline-block along with other style definitions in

4条回答
  •  清歌不尽
    2021-01-26 08:53

    You can use selectors like so:

    \9 – IE8 and below, * – IE7 and below, _ – IE6

    So in your case:

    *display: inline;
    

    You can simply add this to the rest of the css:

    div{
    display: inline-block;
    // some;
    // other;
    // css;
    *display: inline;
    }
    

    Read my blog post on this.

    Update

    IE version 5 till 8. (They are all affected) – Cobra_Fast 1 min ago

    So in this case, you'd use

    div{display\9:inline;}
    

提交回复
热议问题