代码:
005-css.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS文本修饰</title>
<link rel="stylesheet" href="./005.css">
</head>
<body>
<h1>IE浏览器将退役,27年从巅峰沦为“笑柄”</h1>
<h2>一度辉煌</h2>
<h3>沦为笑柄</h3>
<h4>衍生问题出现</h4>
<p>
中新财经5月17日电(记者 吴涛)“微软IE浏览器6月16日正式退役"。虽然此前微软就有过暗示,但最终,
微软在16日还是正式官宣了这一消息。该话题一度冲上微博热搜,不少网友称,IE浏览器见证了几代人
的青春, “E网情深”成为历史,“爷青结”。
</p>
</body>
</html>
005.css:
h1 {
text-decoration-line: overline;
text-decoration-color:red ;
}
h2 {
text-decoration-line: line-through;
text-decoration-color: blue;
}
h3 {
text-decoration-line: underline;
text-decoration-color: green;
}
p {
text-decoration-line: underline overline;
text-decoration-color: purple;
}
代码:
h1 {
text-decoration-line: overline;
text-decoration-color:red ;
text-decoration-style: solid;
}
h2 {
text-decoration-line: underline;
text-decoration-color: blue;
text-decoration-style: double;
}
h3 {
text-decoration-line: underline;
text-decoration-color: green;
text-decoration-style: dotted;
}
h4 {
text-decoration-line: underline;
text-decoration-style: dashed;
}
p {
text-decoration-line: underline;
text-decoration-color: purple;
text-decoration-style: wavy;
}
text-decoration:none;可以设置下划线的值为none,即没有下划线。