zoukankan      html  css  js  c++  java
  • 样式 style="clear:both"

    <div style="clear:both"></div>
    clear:both该属性的值指出了不允许有浮动对象的边。
    通俗的讲:这段代码的做用是:清除同行元素,不允许其它元素与之在一行内。
    我经常用的代码。 <style> .clear10{clear: both; height:10px; overflow:hidden;} .yao{float:left;100px;} </style> <div class="yao">大家好</div> <div class="yao">我也很好</div> <div class="clear10"></div> <div class="yao">大家好</div>
    那么.clear10起到的作用就是在清除前两行浮动的影响并且间隔10px的高度。使用下面的<div class="yao">大家好</div>与前行不在同一行内。
  • 相关阅读:
    Linux ld命令
    Linux readelf命令
    linux ar命令
    Linux升级Ruby
    Linux dkpg命令
    Linux apt-get命令
    Linux xxd命令
    Linux objdump命令
    Linux ldconfig命令
    git 删除目录
  • 原文地址:https://www.cnblogs.com/dearbear/p/3448497.html
Copyright © 2011-2022 走看看