【发布时间】:2013-07-09 11:20:08
【问题描述】:
此 CSS 中的哪些内容在 IE8 和 IE7 中不起作用?
nav {
position: fixed;
top:60px;
left:30px;
color:black;
float:left;
}
nav div#button {
width:205px;
height:50px;
text-align: center;
padding-top: 5px;
margin-bottom:10px;
font-size: 23px;
}
nav a {
color: #000000;
text-decoration: none;
}
nav div#button:active {
width:250px;
height:65px;
}
nav div#button.home {
background-color: #79b22c;
}
nav div#button.links {
background-color: #3b50cc;
}
nav div#button.aanbod {
background-color: #BA3BCC;
}
nav div#button.forum {
background-color: #1CAEB2;
}
nav div#button.contact {
background-color: #daa520;
}
它在 IE9 和 IE10 中运行良好。但 IE8 和 IE7 显示无样式文本。 我已经用浏览器堆栈进行了测试。 谁能帮帮我?
【问题讨论】:
-
nav div#button引起了一些担忧。在您的标记中,有多少个元素有id="button"? -
5 个带有 'id="button"' 的元素
-
ID 对于整个
<html>文档中的单个元素应该是唯一的。您不应拥有超过 1 个id="button"。如果您需要在多个元素上重用,请改用class名称 --class="button"和class="button home"。 -
nav元素 isn't supported. -
标签: css internet-explorer internet-explorer-8 cross-browser internet-explorer-7