当前位置:首页 > Div + CSS

只针对ie6,ie7和firefox的csshack

canca18年前 (2008-11-25)Div + CSS623

只针对ie6,ie7和firefox的csshack

注意都要写在正常样式的后边,除!important方法在前边

---------------针对样式名------------

如果只让ie6看见用*html .head{color:#000;}     !!!!无法通过验证!!!!

如果只让ie7看见用*+html .head{color:#000;}  通过验证

如果只让ff看见用html>/**/body .head{color:#000;}   通过验证   或者:root body .head{color:#000;}  !!!!无法通过验证!!!!


如果只是不让ie6看见用html>body .head{color:#000;}   通过验证
如果只是不让ie7看见无
如果只是不让ff看见用*body .head{color:#000;}  !!!!无法通过验证!!!!

-------------针对具体属性--------------

如果只让ie6看见用_    .head{_color:#000;}   !!!!无法通过验证!!!!
如果只让ie7看见用*与important结合的方法:    .head{*color:#000;!important; color:#000;}   !!!!无法通过验证!!!!
如果只让ff看见无

如果只是不让ie6看见用 /**/  .head{color /**/:#000;} 或者用!important,写法: width:20px!important; width:50px; 通过验证
如果只是不让ie7看见无
如果只是不让ff看见用*或者+        .head{*color:#000;  +color:#000;}  !!!!无法通过验证!!!!

 

总结出能够通过验证的有
如果只让ie7看见用*+html .head{color:#000;}  通过验证
如果只让ff看见用html>/**/body .head{color:#000;}   通过验证
如果只是不让ie6看见用html>body .head{color:#000;}   通过验证
如果只是不让ie6看见用 /**/  .head{color /**/:#000;} 或者用!important写法: width:20px!important; width:50px; 通过验证

在结构里写如下css专门针对ie6        通过验证
<!--[if lte IE 6]>
<link href="css/rentcar_ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

扫描二维码推送至手机访问。

版权声明:本文由Ant.Master's Blog发布,如需转载请注明出处。

本文链接:https://iant.work/post/347.html

标签: Div + CSS
分享给朋友:

“只针对ie6,ie7和firefox的csshack” 的相关文章

div+css布局漫谈

1.CSS布局常用的方法:float : none | left | right 取值:none : 默认值。对象不飘浮 left : 文本流向对象的右边 right : 文本流向对象的左边 它是怎样工作的,看个一行两列的例子 xhtml: <div > <div…

CSS DIV超出范围加(...)

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>www.aspxuexi.com asp学习网</title&…

P:first-letter P:first-line 示例

<style type="text/css">p { color: red; font-size: 12pt }p:first-letter { color: green; font-size: 200% }p:first-line { color: blue }</style&g…

如何处理不同浏览器之间的样式表的兼容性问题

IE 不支持 "min-height" 样式本站是这样解决的:.contents { ... ...; min-height:380px; ie-only:expression(this.style.height="390px"); } 兼容 IE 和 Mozilla 的 hr 定义Mozilla…

On having layout

英文原文在此:http://www.satzansatz.de/cssd/onhavinglayout.htm 文中所有的 layout 这个单词都未作翻译,一来本身这个单词意思就比较多,翻成啥都觉得别扭,二来它也是专有的属性,所以就意会一下吧。水平有限,很多地方都是模模糊糊...…

[CSS Filter and Hacks] 解決IE vs Firefox等浏览器排版显示不同题

万恶IE成为大家的箭靶也不是第一天了,除了安全漏洞外,最让网页开发者头痛的就是CSS支持的问题,每次在IE上排版完后,在Firefox上看就完全不一样,在Firefox上排好则IE又乱掉了。关于IE或是其它浏览器在显示上面的问题打算整...…

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。