How can I set CSS only for specific IE browsers?

后端 未结 7 2315
庸人自扰
庸人自扰 2020-12-13 22:24

I have a CSS/jQuery Checkbox style script: http://jsfiddle.net/BwaCD/

The problem is, in current browsers in order for the span to float over the input, the input\'s

7条回答
  •  半阙折子戏
    2020-12-13 23:00

    I have a useful solution for IE 10 and 11. The script checks for IE and version and then appends .ie10 or .ie11 class to the tag.

    That way you can write specific rules like .ie10 .something {} and they get applied only when the browser is IE 10 or 11.

    Check it out, it's useful for graceful degradation, tested on a few commercial sites and not really hacky: http://marxo.me/target-ie-in-css

提交回复
热议问题