gpt4 book ai didi

html - 删除超链接下划线也会删除超链接

转载 作者:太空宇宙 更新时间:2023-11-03 22:39:51 25 4
gpt4 key购买 nike

我导入 fontawesome 图标。

<script src="https://use.fontawesome.com/e5d9dacb14.js"></script>

接下来,我有一个超链接:

<a href="https://google.nl"> <i class="fa fa-user-o" ></i> Personal Page </a> 

这个超链接有烦人的下划线,我试着按照 this answer 删除它.

为此,我将其添加到我的 CSS 中。

a.nounderline {text-decoration: none; }

然后我将超链接更改为:

<a.nounderline href="https://google.nl"> <i class="fa fa-user-o" ></i> Personal Page </a.> 

现在。这确实删除了下划线,但它也删除了超链接。 See my jsfiddle

最佳答案

如果你想给你的标签添加class,通过class="nounderline"添加

a.nounderline {
text-decoration: none;
}
<a class="nounderline" href="https://google.nl"> <i class="fa fa-user-o"></i> Personal Page </a>

阅读更多关于 html classes 的信息和 .class selector

关于html - 删除超链接下划线也会删除超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44499477/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com