<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>继承性</title>
<style type="text/css">
.father {
color: red;
font-size: 30px;
background: green;
}
.child {
color: aqua;
}
</style>
</head>
<body>
<!--继承:给父级设置了一些属性,子级继承了父级的属性
有一些属性是可以继承下来 color、font-*、text-*、line-*
像一些盒子元素、定位的元素(浮动、绝对定位、固定定位)不能继承
-->
<div class="father" id="egon">
<div class="child">
<p>alex</p>
</div>
</div>
</body>
</html>