问题
I've used a:hover before; I don't know why it isn't working now. Here's the code.
<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>
The links appear like the default links for some reason. (They are purple because I have already visited them and they are underlined.)
回答1:
You need to close your p {} selector with the last }
p {
font-family: Arial;
color: #2B2B2B;
font-size: 13px;
} <---------
a:link {
来源:https://stackoverflow.com/questions/20830812/alink-avisted-ahover-and-aactive-not-working