我试图让一个链接显示为白色,没有下划线。文本颜色正确显示为白色,但蓝色下划线却顽固地存在。我在CSS中尝试了text-decoration: none;
和text-decoration: none !important;
来去除链接的下划线。两者都不奏效。
.boxhead .otherPage {
color: #FFFFFF;
text-decoration: none;
}
<div class="boxhead">
<h2>
<span class="thisPage">Current Page</span>
<a href="myLink"><span class="otherPage">Different Page</span></a>
</h2>
</div>