网站建设时对网页文字进行文字修饰可以使用CSS的text-decoration,
语法格式如下:
text-decoration: underline | overline |line-throungh | blink | none
说明:
underline : 给文字加下划线;
overline: 给文字加上划线;
line-throungh: 给文字加删除线;
blink: 文字在闪烁(目前浏览器不支持);
none: 使上述效果都不会发生;
网站制作使用 text-decoration 属性对文字进行修饰,例子如下:
<html>
<head>
<title>CSS网站设计使用文字修饰text-decoration</title>
</head>
<style type="text/css">
<!--
#under{text-decoration:underline}
#over{text-decoration:overline}
#throungh{text-decoration:line-throungh}
-->
</style>
<body bgcolor=lightyellow>
<center>
<font size=5 color=red>网页文字修饰text-decoration的使用效果</font>
</center>
<p id=under>文字下划线效果</p>
<p id=over>文字上划线效果</p>
<p id=throungh>文字删除线效果</p>
</body>
</html>
其中,none参数一非常有用,它可以使文字不以下划线的形式显示。例如取消链接时带下划线的形式。
a:link{text-decoration:none}
a:active{text-decoration:none}
a:visited{text-decoration:none}
本课主题:网站文字修饰text-decoration
相关主题:
网页文字大小写
font-size
font-weight
font-variant
font-style
请拨打热线:0571-86586571

