a:visited在Mozilla Firefox中不起作用 [英] a:visited doesn't work in Mozilla Firefox

查看:159
本文介绍了a:visited在Mozilla Firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个链接,当我尝试设置样式时;

  a:visited {
text装饰:下划线;
color:#FF0000;
}

似乎没有效果。它工作正常在IE。我也遵循了命令;链接,访问,悬停,活动。

这是已知问题,还是我犯了什么错误?

解决方案

它可能与特定性和你的选择器的顺序有关。一般来说,当指定链接状态时,你应该遵循 l o v e / ha teprincipal:


  1. l ink


  2. v isited


  3. h


  4. a ctive / ol>

    也许你有:hover :active selector :visited


    I have created a link and when I try to set the style;

    a:visited {
        text-decoration: underline;
        color: #FF0000;
    }
    

    It doesnt seem to work. It works fine in IE. I have also followed the order; link, visited, hover, active.
    Is this a known issue, or am I making any mistake?

    解决方案

    It might have to do with specificity and the order that you have your selectors in. In general, when specifying link states, you should follow the "love/hate" principal:

    1. :link

    2. :visited

    3. :hover

    4. :active

    Maybe you have the :hover or :active selector before :visited?

    这篇关于a:visited在Mozilla Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆