为什么我的div旁边有href装饰?
Why is there href decoration next to my div?
为什么下图中文字后面有下划线?
<a href="index.html">
<div style="display: inline-block">
<img src="images/fallout.svg">
<h1 class="header_text">Mods</h1>
</div>
</a>
.header_text {
display: inline-block;
font-size: 20px;
color: white;
}
编辑:修改了我的答案,因为我不明白这个问题。
要去除超链接中的下划线,请使用以下代码:
#example {
text-decoration: none;
}
超链接默认有 "underline" 的文本装饰。您必须指定 "none" 才能摆脱它。
为什么下图中文字后面有下划线?
<a href="index.html">
<div style="display: inline-block">
<img src="images/fallout.svg">
<h1 class="header_text">Mods</h1>
</div>
</a>
.header_text {
display: inline-block;
font-size: 20px;
color: white;
}
编辑:修改了我的答案,因为我不明白这个问题。
要去除超链接中的下划线,请使用以下代码:
#example {
text-decoration: none;
}
超链接默认有 "underline" 的文本装饰。您必须指定 "none" 才能摆脱它。