1,注意点:搭配使用如underline dotted red 可以无序,这个和字体族不一样
2,代码演示
<style>
a{
/* 去掉下划线 */
text-decoration: none;
}
/* 上面有根线 */
div:nth-of-type(1){
text-decoration: overline;
}
/* 中间有根线 */
div:nth-of-type(2){
text-decoration: line-through ;
}
/* 下面有根线 */
div:nth-of-type(3){
text-decoration: underline dotted red;
}
</style>
</head>
<body>
<a href="#">去百度</a>
<br>
<br>
<div>mofa1</div>
<br>
<div>mofa2</div>
<br>
<div>mofa3</div>
<br>
</body>
3,运行结果