CSS代码a:visited不起作用

伊娃

我有一个非常菜鸟的问题,所以我希望有人可以帮助我。

我有一个Blogger博客,但无法获得想要的功能链接。

我希望帖子内容和侧栏中的链接-带有紫色阴影(#8B7083)并带有下划线的链接-对于a:link和a:visited都看起来相同。由于某些原因,即使我的CSS中没有任何链接,访问过的链接也会变黑。

请帮帮我?

史诗先生

确实在CSS中拥有它:

 .popular-posts .item-title a:link, a:hover, a:active, a:visited {
      color: black !important;
      text-decoration: none !important;
 }

尽量不要使用!important关键字,它会覆盖所有其他样式。使用特定性来确定将哪些样式应用于以下位置:http : //css-tricks.com/specifics-on-css-specificity/

查看您的选择器,我相信您可能不会按预期构造它们。您在找这个吗?

  .popular-posts .item-title a:link, .popular-posts .item-title a:hover,  .popular-posts .item-title a:active, .popular-posts .item-title a:visited

就目前而言,选择器中的最后三个部分(a:hover,a:active和a:visited)正在选择具有这些状态的这些页面上的所有链接,因为您不会通过后代选择器来限制它们。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章