如何才能为特定的IE浏览器设置CSS? [英] How can I set CSS only for specific IE browsers?

查看:178
本文介绍了如何才能为特定的IE浏览器设置CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CSS / jQuery复选框样式脚本: http://jsfiddle.net/BwaCD/



问题是,在当前的浏览器中,为了使span跨越输入,输入的位置必须是绝对的。但在IE8&下面,脚本将不工作,因此我留下和绝对定位的输入,只是漂浮在其他元素。我不是要求脚本工作在IE8&

我想知道如何使用CSS来设置特定样式,如果它是IE8及以下。我想jQuery将是可以接受,如果有必要,但我不认为是。我知道这可以用CSS& HTML我只是不知道如何。

解决方案

怎么样?



http://www.quirksmode.org/css/condcom.html



或者如果你不喜欢这些语句



http://net.tutsplus.com/tutorials/html-css -techniques / quick-tip-how-to-target-ie6-ie7-and-ie8-unique-with-4-characters /


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 position must be absolute. But in IE8 & below, the script will not work and therefore I'm left with and absolutely positioned input that is just floating over other elements. I am not asking for the script to work in IE8 & below.

I want to know how I can use CSS to set a specific style if it is IE8 and below. I guess jQuery would be acceptable if it's necessary, but I don't think it is. I know this can be done with just CSS & HTML I just don't know how.

解决方案

How about that?

http://www.quirksmode.org/css/condcom.html

Or that if you don't like those statements

http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters/

这篇关于如何才能为特定的IE浏览器设置CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆