阅读背景:

html中css清除浮动的四种方法

来源:互联网 

清除浮动的原因就是让两个及两个以上的元素显示在同一排;

<style> *{ margin:0; padding:0; } .outBox{ border:2px solid pink; font-size:20px; color:#fff; font-weight: bold; } .left{ width:200px; height: 200px; background:skyblue; text-align: center; line-height:200px; } .right{ width: 100px; height: 100px; background:slateblue; text-align: center; line-height:100px; } </style> <div class="outBox"> <div class="left">左</div> <div class="right">右</div> </div> <div class="other"></div> <style> *{ margin:0; p



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: