当前阅读教程:CSS入门到精通 > 文本修饰 text-decoration属性 | |||||||||||||||||||||||
阅读(22555525) 收藏 赞(5685) 分享 | |||||||||||||||||||||||
上一篇: 文本对齐 text-align属性 | 下一篇: 文本缩进 text-indent | ||||||||||||||||||||||
属性定义及使用说明text-decoration 属性规定添加到文本的修饰,下划线、上划线、删除线等。
浏览器支持表格中的数字表示支持该属性的第一个浏览器版本号。 属性值
示例
代码<!doctype html> <html> <head> <meta charset="utf-8"> <title>文本修饰 text-decoration属性</title> <!--定义内部样式--> <style> h1{ text-decoration: overline;/*上划线*/ } h2{ text-decoration: line-through;/*删除线*/ } h3{ text-decoration: underline;/*下划线*/ } </style> </head> <body> <h1>标题:黄菊华老师(上划线)</h1> <h2>标题:黄菊华老师(删除线)</h2> <h3>标题:黄菊华老师(下划线)</h3> </body> </html> 效果图 |
|||||||||||||||||||||||
上一篇: 文本对齐 text-align属性 | 下一篇: 文本缩进 text-indent |