Noh*_*ohl 3 css internet-explorer
所以我一直试图在IE 7和8中使一些css下拉菜单工作
它们在其他浏览器上运行良好.
网站是:http://hanling.focusww.com
我有一块css,我包含一些我想隐藏在IE 7和8中的行
我在最后用'*'标记了这些行.
#menu a:visited {
color:#f9f6e0;
display:block;
font-weight:700;
padding-bottom:10px; //kill this in ie *
padding-left:12px;
padding-right:12px;
padding-top:10px; //kill this in ie *
}
Run Code Online (Sandbox Code Playgroud)
有人能指出我一篇解释如何做到这一点的文章吗?
您可以通过以下简单方式实现IE conditional comments:
HTML
<!--[if IE 7]> <html class="ie7"> <![endif]-->
<!--[if IE 8]> <html class="ie8"> <![endif]-->
Run Code Online (Sandbox Code Playgroud)
CSS
#menu a:visited {
color:#f9f6e0;
display:block;
font-weight:700;
padding-bottom:10px; //kill this in ie *
padding-left:12px;
padding-right:12px;
padding-top:10px; //kill this in ie *
}
.ie7 #menu a:visited,
.ie8 #menu a:visited, {
padding-bottom: 0; //kill this in ie *
padding-top: 0; //kill this in ie *
}
Run Code Online (Sandbox Code Playgroud)
..或者也可以CSS-Hacks,更多:http://www.webdevout.net/css-hacks#in_css
#menu a:visited {
color:#f9f6e0;
display:block;
font-weight:700;
padding-bottom:10px;
padding-bottom:0\9; //kill this in ie *
padding-left:12px;
padding-right:12px;
padding-top:10px;
padding-top:0\9; //kill this in ie *
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3476 次 |
| 最近记录: |