【发布时间】:2010-05-15 13:10:21
【问题描述】:
为什么 IE 7 不处理锚的 css 背景属性?
css:
.nav a
{
float: left;
display: block;
padding: 5px;
height: 25px;
line-height: 25px;
font-weight: bold;
}
.nav a:hover
{
background: #fff;
color: #000;
}
html:
<div class="nav">
<a href="#">anchor</a>
</div>
它没有背景,但只有在ie7中。为什么?
【问题讨论】:
-
您可以使用
background-color来确保不是这样吗? -
另外,你能发布一个 URL 或页面的完整 HTML 吗? IE7 有很多悬停错误,但大多数只有在链接元素被包裹在“有趣”的其他元素中、使用脚本动态操作等时才会出现。因此查看页面上下文会有所帮助。
标签: html css xhtml internet-explorer-7