【问题标题】:Why is Bootstrap so stubborn with not allowing different HTML classes for links?为什么 Bootstrap 如此固执,不允许链接使用不同的 HTML 类?
【发布时间】:2014-12-05 06:19:10
【问题描述】:

这看起来很奇怪,但我似乎无法使用引导程序从特定页面更改默认 HTML CSS URL 链接颜色。

我试过了,但 Bootstrap 仍然坚持它一直是蓝色......

有什么想法吗?

这是我尝试过的,但没有任何乐趣......

        .class1 A:link {color: red; text-decoration: none!important;}
        .class1 A:visited {color: red; text-decoration: none!important;}
        .class1 A:active {color: red; text-decoration: none!important;}
        .class1 A:hover {color: red; text-decoration: underline!important;}

有链接

        <th><a href="" class="class1">Category</a></th>

谢谢...

【问题讨论】:

  • 将选择器更改为a.class1:link 等等。在 CSS 选择器中,空格是后代组合符,因此 .class1 A:link 将匹配所有属于 .class1 后代的链接(如果有)。
  • 跟bootstrap没关系,你的CSS错了。

标签: html css twitter-bootstrap


【解决方案1】:

是的,非常感谢修复它...

        a.class1:link {color: red; text-decoration: none!important;}
        a.class1:visited {color: red; text-decoration: none!important;}
        a.class1:active {color: red; text-decoration: none!important;}
        a.class1:hover {color: red; text-decoration: underline!important;}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-09
    • 2016-12-09
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 2013-09-21
    • 1970-01-01
    • 2017-03-18
    相关资源
    最近更新 更多