<div id="fu">
        <div id="zi">子div</div>
    </div>
#fu{  /*父div设置宽 高300px 背景红色 */
    width:300px;  
    height:300px;
    background:red; 
}
#zi{margin-top:30px; /*子div设置上边距30px 背景绿色 */
    background:green;
}
为fuID选择器加上border,看的会清楚一些
#fu{
width:300px;
height:300px:
background:red:
border:20px solid blue;
}
#fu{ /*父div设置宽 高300px 背景红色 */
width:300px;
height:300px;
background:red;
position:relative;
}
#zi{margin-top:30px; /*子div设置上边距30px 背景绿色 */
background:green;
position:absolute;
}
加一句就好
#zi{margin-top:30px; /*子div设置上边距30px 背景绿色 */
background:green;
position:absolute;
}