作用:
我的理解是把块级的想放一堆紧挨着,就可以用float,如下图:

不使用时(各自占一行):

注意:
使用float,要使用一个
<div style="clear: both"></div>
相当于把有float的标签拉回来
使用float,要使用一个
<div style="clear: both"></div>
相当于把有float的标签拉回来
本文标题:css基础——float
本文链接:https://www.haomeiwen.com/subject/vmninhtx.html
网友评论