本文小编为大家详细介绍“css a标签中的下划线怎么去掉”,内容详细,步骤清晰,细节处理妥当,希望这篇“css a标签中的下划线怎么去掉”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。
text-decoration 属性
text-decoration
属性是用来设置 a 标签的划线属性的。其属性值有:
-
none:去掉下划线
-
underline:设置下划线
-
overline:在文本上方设置线条
-
line-through:在文本中间设置线条
-
initial:默认值
-
inherit:从父元素中继承
我们来看下具体代码与实现效果:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>a标签划线 - 云搜网(yisu.com)</title>
<style type="text/css">
#none{
text-decoration: none;
}
#overline{
text-decoration: overline;
}
#overline{
text-decoration: line-through;
}
</style>
</head>
<body>
<a href="">这是正常样式</a><br>
<a href="" id="none">无下划线</a><br>
<a href="" id="overline">上划线</a><br>
<a href="" id="line-through">中划线</a><br>
</body>
</html>
读到这里,这篇“css a标签中的下划线怎么去掉”文章已经介绍完毕,想要掌握这篇文章的知识点还需要大家自己动手实践使用过才能领会,如果想了解更多相关内容的文章,欢迎关注云搜网行业资讯频道。