html - 为什么文字装饰: none is not working inside HTML <ins> element

标签 html css web

我会让代码说话。我什至尝试将 important! 添加到 css 值,但仍然无法删除行。

在 Chrome 和 Safari 中测试。

    .no-decoration {
      text-decoration: none;
    }
  <h1> ins tag</h1>
  <ins>
      <a class="no-decoration" href="">Some link</a>
  </ins>
  
  <h1>no ins tag</h1>
  <div>
      <a class="no-decoration" href="">Some link</a>
  </div>

最佳答案

您应该为 <ins> 添加样式标记也。 使用以下代码更新您的 CSS,

.no-decoration, ins {
  text-decoration: none;
}

请检查链接 https://jsfiddle.net/c1jp3pev/

关于html - 为什么文字装饰: none is not working inside HTML <ins> element,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50576259/

相关文章:

php - 表单提交 - 防止页面重新加载 jQuery

html - 从 jsfiddle 在本地测试 html/css 图像

css - 由于 <span> 为空导致的 html/css 对齐问题。是什么让我的内容下移?

javascript - 如何将一个 li 向右对齐并从中下拉列表?

php - 向 php native 类添加函数?

html - 如何使用 html 禁用输入字段历史记录

javascript - Angular 可以从一个 json 文件中获取数据,但不能从一个单独的文件中获取数据?

html - Bootstrap : order elements with the 'navbar-right' class

css - SVG 图像在 IE9 的 CSS 背景中不起作用

jquery - 如何将不同的菜单样式应用到首页?