【问题标题】:css text-decoration:none won't remove text underline [closed]css text-decoration:none不会删除文本下划线[关闭]
【发布时间】:2021-07-06 16:33:56
【问题描述】:

我有一些带下划线的文本,但 text-decoration:none 不会删除文本下划线。

您可以在我的网站 [这里] 的登录页面上看到这一点。您会很容易找到它:它是登录页面上唯一带下划线的文本。

【问题讨论】:

  • 寻求代码帮助的问题必须包括在问题本身中重现它所需的最短代码,最好是在堆栈片段中。尽管您提供了一个链接,但如果它变得无效,那么您的问题对于未来遇到同样问题的其他 SO 用户将毫无价值。见Something in my website/example doesn't work can I just paste a link
  • 我想你忘了你的右引号
  • 锚 (a) 标签有自己的样式被浏览器应用,所以记得为它们设置文本装饰。

标签: css text-decorations


【解决方案1】:

在第 182 行更改 style.css 中的现有代码。

.game-link h5, .game-link p {
    text-decoration: none !important;
    text-decoration-color: var(--white-l);
}

到 ->>

.game-link h5, .game-link p {
    text-decoration: inherit;
    text-decoration-color: var(--white-l);
}

添加 CSS -

a.game-link {
    text-decoration: none;
}

【讨论】:

    【解决方案2】:

    您是否尝试过添加:

    文本装饰:无!重要;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-05
      • 1970-01-01
      • 2015-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-21
      • 1970-01-01
      相关资源
      最近更新 更多