【发布时间】:2013-10-22 03:35:13
【问题描述】:
我有一个问题,因为我为我的网站制作了一个自定义样式表,但它在 Chrome 中不起作用。链接是蓝色的,访问过的页面是洋红色的,并且链接在悬停时带有下划线。无效的代码:
a:link,
a:visited {
color:black;
}
a {
text-decoration: none;
}
a:active,
a.active {
text-decoration:none;
}
a:hover,
a:focus {
text-decoration: none;
color:#575757;
}
我试图弄清楚发生了什么,但 Chrome 似乎没有看到这些属性。它会覆盖它们:
a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}
我的样式表在 Mozilla 上运行良好,所以我认为问题出在 Chrome 而不是我的样式表。我应该怎么做才能在 Chrome 中正确显示网站?
【问题讨论】:
-
它对我来说很好用。 jsfiddle.net/SLaks/jNLVZ你在控制台看到了什么?
-
你的样式表中有
a:-webkit-any-link吗? -
@putvande 没有。好像是浏览器在加载页面时添加的。
-
-webkit-any-link不是有效的伪类 AFAIK -
@SLaks 我在控制台中看到的文本应该是这样的。
标签: css google-chrome cross-browser stylesheet