我以前用过 a:hover;我不知道为什么它现在不起作用。这是代码。
<style>
body {
margin: 0px;
background-color: #F0F0EE;
}
p {
font-family: Arial;
color: #2B2B2B;
font-size: 13px;
a:link {
font-family: Arial;
color: #557777;
text-decoration: none;
border: none;
}
a:visited {
font-family: Arial;
color: #557777;
text-decoration: none;
border: none;
}
a:hover {
font-family: Arial;
color: #3F7F77;
text-decoration: none;
border: none;
}
a:active {
font-family: Arial;
color: #557777;
text-decoration: none;
border: none;
}
</style>
出于某种原因,这些链接看起来像默认链接。 (它们是紫色的,因为我已经访问过它们并且它们带有下划线。)
最佳答案
您需要使用最后一个 }
关闭您的 p {}
选择器
p {
font-family: Arial;
color: #2B2B2B;
font-size: 13px;
} <------------
a:link {
关于html - 一个 :link, 一个 :visted, 一个 :hover, 和一个 :active not working?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20830812/