我为链接设置了以下CSS。此代码生成此代码。
在Firefox中:链接为灰色,焦点和悬停白色,但访问后不要变成粉红色。
在Safari中:链接为灰色,焦点和悬停白色,访问时变为粉红色,但刷新/清空缓存/重置野生动物园后不会重置为灰色。
a {
display: block;
text-decoration: none;
font-weight: normal;
}
a:link {
color: grey;
}
a:visited {
text-decoration: none;
color: pink;
}
a:focus {
color: white;
}
a:active,
a:hover {
text-decoration: none;
color: white;
}
请帮助 ?
最佳答案
编辑:
在Firefox中,转到工具->选项->内容(选项卡)->颜色->并选中“允许页面选择自己的颜色”。那应该可以让您看到CSS访问的颜色。
可能未使用正确的顺序:
a:link
a:visited
a:hover
a:active
a:focus
像这样订购代码:
a {
display: block;
text-decoration: none;
font-weight: normal;
}
a:link {
color: grey;
}
a:visited {
text-decoration: none;
color: pink;
}
a:hover,
a:active {
text-decoration: none;
color: white;
}
a:focus {
color: white;
}