1.继承性:
(1)
(2)代码示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body{
/* 只能继承文字类的属性! */
color: brown;
/* 盒子一类的属性不能继承! */
height: 200px;
}
</style>
</head>
<body>
<p>世界和平!!</p>
<h1>我爱铁憨憨!!</h1>
<div>世界真好!!</div>
</body>
</html>