例如下面代码中,inner想要在outer内水平居中,给inner外部添加了一个wrap包裹:
CSS代码为:
.wrap{ float:left; position:relative; left:50%; } .outer{ width:300px; height:400px; background:#FFCC99; } .inner{ width:100px; height:100px; background:#C33; position:relative; /*????*/ left:-50%; }… 显示全部
<div class="outer">
<div class="wrap">
<div class="inner"></div>
</div>
</div>
CSS代码为:
.wrap{ float:left; position:relative; left:50%; } .outer{ width:300px; height:400px; background:#FFCC99; } .inner{ width:100px; height:100px; background:#C33; position:relative; /*????*/ left:-50%; }… 显示全部
按投票排序
按时间排序