inherit
对于除
direction
和
visibility
ul a
颜色声明,而不是选择使用普通
a
颜色声明?只是忽略了整个
乌拉
要清楚:在大多数浏览器中,第一个链接是红色的,第二个链接是蓝色的。在IE7中,第一个链接是红色的,但第二个链接也是红色的,即使我至少有一个声明,它应该在
规则。
<!DOCTYPE html>
<html>
<head>
<title>Anchor Inherit Test</title>
<style type="text/css">
body {
color: #369;
}
a {
color: #f00;
}
ul a {
color: #369;
color: inherit;
}
</style>
</head>
<body>
<p>This is testing a <a href="#">red link</a> in a paragraph.</p>
<ul>
<li><a href="#">here is a link that should not be red</a></li>
</ul>
</body>
</html>