IE8 css selector

后端 未结 14 1937
臣服心动
臣服心动 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 22:52

    OK so, it isn't css hack, but out of frustration for not being able to find ways to target ie8 from css, and due to policy of not having ie specific css files, I had to do following, which I assume someone else might find useful:

    if (jQuery.browser.version==8.0) {
       $(results).css({
             'left':'23px',
             'top':'-253px'
          });
    }
    

提交回复
热议问题