针对IE6,IE7,IE8和firefox浏览器css hack

针对样式名

如果只让ie6看见用*html .head{color:#000;}
如果只让ie7看见用*+html .head{color:#000;}
如果只让ff看见用:root body .head{color:#000;}
如果只让ff、IE8看见用html>/**/body .head{color:#000;}
如果只是不让ie6看见用html>body .head{color:#000;} 即对IE 6无效
如果只是不让ff、IE8看见用*body .head{color:#000;}    即对ff、IE8无效

针对具体属性

如果只让ie6看见用_     .head{_color:#000;}
如果只让ie7看见用+与_结合的方法:     .head{+color:#f00;!;_color:#000;}

IE8正式版hack

\9″ 例:”margin:0px auto\9;”.这里的”\9″可以区别所有IE8和FireFox.
“*” IE6、IE7可以识别.IE8、FireFox不能.
“_” IE6可以识别”_”,IE7、IE8、FireFox不能.
如:
.a {color:#f00;     color:#f60\9;    +color:#00FF00;    _color:#0000FF; }
从左到右分别对应 FF,IE8 IE7 IE6

Related posts:

  1. JavaScript可移动弹出层
  2. CSS模拟html的'title'和'alt'的提示效果
  3. Jquery 获取元素数量 length
  4. ie6下面层边框断裂
  5. JQUERY搜索框提示效果
此条目发表在 前端技术 分类目录,贴了 , , , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已被标记为 *

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word