【问题标题】:a:link, a:visted, a:hover, and a:active not working?a:link、a:visited、a:hover 和 an:active 不起作用?
【发布时间】:2014-01-16 19:45:49
【问题描述】:

我以前用过a:hover;我不知道为什么它现在不起作用。这是代码。

<style>

    body {
    margin: 0px;
    background-color: #F0F0EE;
    }

    p {
    font-family: Arial;
    color: #2B2B2B;
    font-size: 13px;

    a:link {
        font-family: Arial;
        color: #557777;
        text-decoration: none;
        border: none;
    }

    a:visited {
        font-family: Arial;
        color: #557777;
        text-decoration: none;
        border: none;
    }

    a:hover {
        font-family: Arial;
        color: #3F7F77;
        text-decoration: none;
        border: none;
    }

    a:active {
        font-family: Arial;
        color: #557777;
        text-decoration: none;
        border: none;
    }

</style>

由于某种原因,这些链接看起来像默认链接。 (它们是紫色的,因为我已经访问过它们并且它们带有下划线。)

【问题讨论】:

    标签: html css hyperlink hover


    【解决方案1】:

    你需要用最后一个}关闭你的p {}选择器

    p {
    font-family: Arial;
    color: #2B2B2B;
    font-size: 13px;
    

    }

    a:link {
    

    【讨论】:

    • LOL SORRY NOOB MISTAKE there
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-03-18
    • 2023-03-11
    • 1970-01-01
    • 2011-03-30
    • 1970-01-01
    • 1970-01-01
    • 2011-11-14
    相关资源
    最近更新 更多