好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

如何使用text-decoration

我们在网页里常常会使用使用CSS代码来对象文字内容加上下划线。那么我们就要用到text-decoration了 ,如何使用呢?今天我们给大家好好介绍一下。

使用CSS属性单词:

text-decoration : none || underline || blink || overline || line-through

text-decoration下划线CSS单词值参数:

none :  无装饰

blink :  闪烁

underline :  下划线

line-through :  贯穿线

overline :  上划线

text-decoration:none 无装饰,通常对html下划线标签去掉下划线样式

text-decoration:underline 下划线样式

text-decoration:line-through 删除线样式-贯穿线样式

text-decoration:overline 上划线样式

HTML常规下划线标签

在HTML u标签下划线标签“U”即可对对象文字加html下划线。

实例:

<u>我被U标签加下滑线</u> 

CSS控制对象下划线属性样式

html u下划线与CSS下划线对比应用案例

CSS去掉html标签划线样式

如果我们想去掉对应html中删除线s标签删除线样式、去掉html u下划线、去掉html上划线样式。

1、去掉html s删除线贯穿线样式

.p s{text-decoration:none}

去掉p类对象盒子里html s标签样式属性

2、去掉html u下划线样式

.p u{text-decoration:none}

去掉p类对象盒子里u标签下划线线样式属性

五、超链接下划线高级运用 - TOP

我们接下来为大家讲解常见CSS 超链接,当随便经过时候文字对象被加下划线。

代码如下:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html;
 charset=utf-8" /> 
<title>下划线演示</title> 
<style> 
.yangshi a{ text-decoration:none;}
/* css注释: 鼠标经过热点文字被加下划线 */ 
.yangshi a:hover{ text-decoration:underline;}
/* 鼠标经过热点文字被加下划线 */ 
</style> 
</head> 
<body> 
<p> 
<span class="yangshi"> 
<a href="http:/www.gxlcms.com">p</a> 
</span> 
</p> 
</body> 
</html> 

html中的label标签使用方法

以上就是如何使用text-decoration的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于如何使用text-decoration的详细内容...

  阅读:41次