用css来控制div 的定义方法很多,下面我们就来看看不同方法的实例代码吧.
代码如下
复制代码
<div style="width:150px;height:150px;background:#FF0000;position:relative">
<div style="width:100px;height:50px;background:#006633;position:absolute;right:0;bottom:0"></div>
</div>
<div style="width:150px;height:150px;background:#FF0000;padding-bottom:0px;position:relative;">
<div style="width:100px;height:50px;background:#006633;margin-bottom:0px;position:absolute;bottom:0;"></div>
</div>
<div style="width:550px;height:150px;background:#FF0000;">
<div style="width:100%;height:100%;"></div>
<div style="width:100px;height:50px;background:#006633;margin-top:-50px;float:left">的撒旦撒<Br><Br><Br><Br><Br><Br><Br><Br><Br></div>
<div style="width:100px;height:50px;background:#006633;margin-top:-50px;float:left"><Br></div>
</div>
<div style="width:150px;height:150px;background:#FF0000;">
<div style="width:100%;height:100%;"></div>
<div style="width:100px;height:50px;background:#006633;margin-top:-50px"></div>
</div>
好了有四种方法,但是都大同小义了,