text-decoration属性
在css中父子标签都加text-decoration属性,显示的样式效果是累加的:
<html> <head> <style type="text/css"> h1 {text-decoration: overline} h2 {text-decoration: line-through} h3 {text-decoration: underline} h4 {text-decoration:line-through} h4 span{text-decoration:underline} a {text-decoration: none} </style> </head> <body> <h1>这是标题 1</h1> <h2>这是标题 2</h2> <h3>这是标题 3</h3> <h4>这是标题 4 <span>41111</span> </h4> </body> </html>