html - 无法删除 HTML 链接下划线
问题描述
我正在努力摆脱当您将鼠标悬停a
在 HTML 中的元素上时出现的下划线链接。我向链接添加了一个style="text-decoration: none"
属性,a
但是当我将鼠标放在文本上时,会出现下划线。
我也尝试使用这个 CSS:
.nounderline {
text-decoration: none;
}
.nounderline a:hover {
text-decoration: none;
}
然后在链接上设置nounderline
类。a
解决方案
如果在 CSS 中添加!important
after none
,则下划线应该消失。好吧,如果您只使用 html 和 css,它就会消失,并且您的 css 链接正确。
推荐阅读
- javascript - 调用 MouseLeave chartJs Angular
- html - 背景过滤器在桌面 safari 中不起作用
- c# - Unity 中的寻路问题
- r - R匹配忽略大小写和特殊字符
- date - 是否可以根据日期创建动态期间?
- java - Java hibernate 是同时插入和更新的
- dl4j - DL4J - 深度学习 4 J 的数据示例的 URL 是什么?
- javascript - 在浏览器中完全运行经过训练的 PyTorch LSTM/GRU 模型的最佳方式
- javascript - vuejs中的多个嵌套下拉菜单
- powershell - 我是否使用了错误的 .exe 文件来创建 Chocolatey 包?