IE8 css selector

后端 未结 14 1914
臣服心动
臣服心动 2020-11-30 22:44

To target elements only in IE browsers i\'ll use

IE6:

* html #nav li ul {
    left: -39px !important;
    border: 1px solid red;
}

14条回答
  •  再見小時候
    2020-11-30 23:17

    There aren't any selector hacks for IE8. The best resource for this issue is http://browserhacks.com/#ie

    If you want to target specific IE8 you should do comment in html

    
    

    or you could use attribute hacks like:

    /* IE6, IE7, IE8, but also IE9 in some cases :( */
    #diecinueve { color: blue\9; }
    
    /* IE7, IE8 */
    #veinte { color/*\**/: blue\9; }
    
    /* IE8, IE9 */
    #anotherone  {color: blue\0/;} /* must go at the END of all rules */
    

    For more info on this one check: http://www.paulirish.com/2009/browser-specific-css-hacks/

提交回复
热议问题