我很难获得 :link 和 :visited 来处理我的链接。我一直在网上搜索几个小时,并阅读了 20 多个相同问题的不同实例。奇怪的是, :hover 和 :active 正在工作。到底是怎么回事?
这是我的样式表中的代码行:
H1 { text-align: center; width:1000px; font-size: 30pt; font-weight: bold; }
a.artlinks:link {color:#40C0FF; text-decoration: none; font-family: Cambria, Arial; }
a.artlinks:visited { color:#FF00FF; text-decoration: none; font-family: Cambria, Arial; }
a.artlinks:hover {color:#98D7F6; text-decoration: none; font-family: Cambria, Arial; }
a.artlinks:active {color:#FF0000; text-decoration: none; font-family: Cambria, Arial; }
当我在我的 .html 中调用它时,代码是:
<h1><a href="helloworld.html" class="artlinks">Hello World!</a></h1>
有没有人有一个解决方案,还有一种更有效的方法来同时提供常见的 a.artlinks 参数?谢谢