父子块的margin
信息来源:
优度网络 发布日期:2009/3/26 浏览数量:
1179次
文章导读:
<html>
<head>
<title>父子块的margin</title>
<style type="text/css">
<!--
div.father{ /* 父div */
background-color:#fffebb;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
padding:10px;
border:1px solid #000000;
}
div.son{ /* 子div */
background-color:#a2d2ff;
margin-top:30px;
margin-bottom:0px;
padding:15px;
border:1px dashed #004993;
}
-->
</style>
</head>
<body>
<div class="father">
<div class="son">子div</div>
</div>
</body>
</html>