<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>margin传递</title>
<style type="text/css">
body {
margin: 0;
}
.d1 {
background-color: #6183F3;
height: 100px;
}
.da {
background-color: #D60003;
height: 200px;
}
.db {
width: 200px;
height: 200px;
background-color: #FF8D8F;
margin: 10px;
}
.dc {
height: 100px;
background-color: #6E0001;
}
</style>
</head>
<body>
<div class="d1"></div>
<div class="da">
<div class="db"></div>
</div>
<div class="dc"></div>
</body>
</html>
da的子元素dd设置外边距之后左右边距和上边距都出现了外边距,但是为何margin-bottom不把dc(深红色)往下移10px,
知道解决办法,但是就是想请问大神们为何会造成这个现象?非常感谢
echo_kinchao
宝慕林6972327
Siming0