zoukankan      html  css  js  c++  java
  • 【转载】那些年我们一起清除过的浮动demo

    返回文章:那些年我们一起清除过的浮动

    闭合浮动 与 清除浮动 的区别

    .main:很抱歉,现代浏览器中我没能把warp撑高(float:left)
    .side:我也浮动了(float:left)
    .main:warp自己闭合浮动了,所以footer不用再清除浮动了(float:left)
    .side:我也浮动了(float:left)

    闭合浮动的几种方法

    1)添加额外标签

    .main{float:left;}
    .side{float:right;}
     

    2)使用 br标签和其自身的 html属性

    .main{float:left;}
    .side{float:right;}

    3)父元素设置 overflow:hidden

    .main{float:left;}
    .side{float:right;}

    6)父元素设置display:table

    .main{float:left;}
    .side{float:right;}

     转自:http://www.iyunlu.com/demo/enclosing-float-and-clearing-float/index.html

  • 相关阅读:
    poj3111 K Best 最大化平均值,二分
    cd732D Exams 二分
    cf448D Multiplication Table 二分
    hdu2199,double二分
    hdu3015,poj1990树状数组
    Codeforces Round #595 (Div. 3) D2Too Many Segments,线段树
    C#学习
    C#中单例的双重锁定模式
    C# HashSet 用法、Hashtable用法
    如何阅读他人的项目源代码程序
  • 原文地址:https://www.cnblogs.com/hycms/p/3895913.html
Copyright © 2011-2022 走看看