您现在的位置:首页 >> 前端 >> 内容

float浮动语法、取值

时间:2017/11/8 14:31:38 点击:

  核心提示:语法:clear : none | left | right | both取值:none : 默认值。允许两边都可以有浮动对象left : 不允许左边有浮动对象right : 不允许右边有浮动对象bo...

语法:

clear : none | left | right | both

取值:

none : 默认值。允许两边都可以有浮动对象

left : 不允许左边有浮动对象

right : 不允许右边有浮动对象

both : 不允许有浮动对象

对于CSS的清除浮动(clear),一定要牢记:这个规则只能影响使用清除的元素本身,不能影响其他元素

灵活使用after清除浮动

p:after

{

content: "";

clear: both;

display:block;

width:0;

height:0;

visibility:hidden;

}

Tags:FL LO OA AT 
作者:网络 来源:usernameys