CSS文本装饰
添加到文本的修饰
条目:text-decoration
属性:
- none 标准的文本
- underline 文本下划线
- overline 文本上划线
- line-through 穿过文本的线
- blink 闪烁的文本
代码实例
<!DOCTYPE html>
<html lang="en">
<head>
<style>
h1{
text-decoration: underline;
}
h2{
text-decoration: overline;
}
h3{
text-decoration: line-through;
}
h4{
text-decoration: blink;
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>This is Zhengxuzhi</h1>
<h2>This is Zhengxuzhi</h2>
<h3>This is Zhengxuzhi</h3>
<h4>This is Zhengxuzhi</h4>
</body>
</html>
好像google浏览器不支持blink属性还是啥的,没实现出来。
修饰文本的线条类型
条目:text-decoration-line
属性:none|underline|overline|line-through|initial|inherit;
只有火狐浏览器支持该标签,就不深入了。
还有 text-decoration-color text-decoration-style 属性类似,也不深入研究。
文本装饰线条
条目:text-decoration-skip
属性:none | [ objects || spaces || ink || edges || box-decoration
检索或设置对象中的文本装饰线条必须略过内容中的哪些部分。