<分区>
<分区>
我编写的代码是这样的:如果链接被访问,它的字体大小应该减小,文本应该被描边,颜色应该变成淡粉色。只有颜色在变,其他什么都没有变。
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
text-decoration: underline;
color:black;
}
a:visited {
text-decoration: line-through;
font-size:0.2em;
color:#ff6666;
}
a:hover {
text-decoration: overline;
color: #ff1a1a;
font-size: 1.5em;
}
a:active {
text-decoration: none;
font-size: 2em;
color: #800000;
}
</style>
</head>
<body>
<p><b><a href="http://www.facebook.com" target="_blank">This is a link</a></b></p>
<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>
<p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>
</body>
</html>
我的问题是为什么在访问链接时除了颜色之外其他参数没有改变?
最佳答案
允许的样式是:
color
background-color
border-color (and border-color for seperate sides)
outline color
column-rule-color
the color parts of fill and stroke
所有其他样式都继承自 a:link。
关于html - 链接的访问者选择器没有更改字体大小和其他属性,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35192821/