为什么我的div旁边有href装饰?

时间:2015-07-18 19:37:39

标签: html css href text-decorations

为什么下图中的文字后面有下划线?

AOrUb92

<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; 
}

1 个答案:

答案 0 :(得分:0)

编辑:修改了我的答案,因为我没有理解这个问题。

要删除超链接中的下划线,请使用以下代码:

#example {
 text-decoration: none;
}

超链接的文本修饰为&#34;下划线&#34;默认情况下。你必须指定&#34; none&#34;摆脱它。