text-decoration属性一共有五个值,分别是none,blink,underline,line-through,overline,个中underline就示意下划线。语法以下:
div{text-decoration:none}示意:平常去掉下划线
div{text-decoration:underline}示意平常增加下划线款式
div{text-decoration:line-through}平常示意贯穿线
div{text-decoration:overline}设置上划线款式
代码以下:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS测试</title> <style> h1{ text-decoration:underline } a{ text-decoration:none } </style> <body> <h1>ki4网</h1> <p> 有关<a href="http://www.ki4.cn/course/list/17.html" target="_self">JavaScript教程</a> </p> </body> </html>
结果如图:
css去掉下划线只需我们把text-decoration属性改成none就能够了,并非很难,在HTML中,我们能够运用u标签来加下划线,但是在css中我们只能运用text-decoration属性,我们想把下划线设置成赤色,只需我们坚持和字体的色彩雷同就能够了。
以上就是css怎样消灭下划线的悉数引见,假如你想相识更多有关CSS教程,请关注ki4网。
以上就是css怎样消灭下划线?css消灭下划线有哪些要领的细致内容,更多请关注ki4网别的相干文章!