css基础——float
2020-05-12 本文已影响0人
LeslieFind
作用:
我的理解是把块级的想放一堆紧挨着,就可以用float,如下图:
使用float效果
不使用时(各自占一行):
image.png
注意:
使用float,要使用一个
<div style="clear: both"></div>
相当于把有float的标签拉回来
使用float效果
image.png
使用float,要使用一个
<div style="clear: both"></div>
相当于把有float的标签拉回来