木桶 发表于 2019-4-19 11:38:52

a 元素href属性值中url的下划线能去掉么?

如题~~源代码和网页中的分别都能去掉么?

不二如是 发表于 2019-4-19 19:10:57

1、可以,通过CSS,text-decoration属性即可去除
代码:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>TST</title>
    <style>
      .noLine {
            /*去掉下划线*/
            text-decoration: none;
            color: blue;
      }
    </style>
</head>
<body>

<a href="https://ilovefishc.com/" target="">鱼C官网</a>
<br>
<a class="noLine" href="https://ilovefishc.com/" target="">鱼C官网</a>

</body>
</html>



木桶 发表于 2019-4-21 16:29:07

好的,多谢!!
页: [1]
查看完整版本: a 元素href属性值中url的下划线能去掉么?