如图顶部文字
还有图中布局是怎么实现的?上下宽度为什么不一样? 谢谢~!
<style>
.div1{width:500px;height:250px;margin:0 auto;}
.a,.b{float:left;}
.a{width:250px;height:250px;margin-right:50px;background:#f00}
.b{width:200px;height:250px;background:#0f0}
</style>
<div class="div1">
<div class="a"></div>
<div class="b"></div>
</div>
.div1{width:500px;height:250px;margin:0 auto;}
.a,.b{float:left;}
.a{width:250px;height:250px;margin-right:50px;background:#f00}
.b{width:200px;height:250px;background:#0f0}
</style>
<div class="div1">
<div class="a"></div>
<div class="b"></div>
</div>
温馨提示:答案为网友推荐,仅供参考
第1个回答 2014-04-27
在css中使用margin和float属性