我试图将链接显示为白色,没有下划线.文本颜色正确显示为白色,但蓝色下划线固执地持续存在.我尝试text-decoration: none;并text-decoration: none !important;在CSS中删除链接下划线.都没有奏效.
HTML:
.boxhead .otherPage {
color: #FFFFFF;
text-decoration: none;
}Run Code Online (Sandbox Code Playgroud)
CSS:
<div class="boxhead">
<h2>
<span class="thisPage">Current Page</span>
<a href="myLink"><span class="otherPage">Different Page</span></a>
</h2>
</div>Run Code Online (Sandbox Code Playgroud)
如何从链接中删除蓝色下划线?