CSS浮动float

Original 2019-05-01 22:21:05 361
abstract:float:leftlfoat:rightclear:both有时使用了css float浮动会产生css浮动,这个时候就需要清理清除浮动,我们就用clear样式属性即可实现。1、clear语法:clear : none | left|right| both2、clear参数值说明:none :  允许两边都可以有浮动对象both :  不允许有浮动对象left :  不允许左边有浮动对象righ

float:left

lfoat:right

clear:both

有时使用了css float浮动会产生css浮动,这个时候就需要清理清除浮动,我们就用clear样式属性即可实现。
1、clear语法:
clear : none | left|right| both

2、clear参数值说明:
none :  允许两边都可以有浮动对象
both :  不允许有浮动对象
left :  不允许左边有浮动对象
right :  不允许右边有浮动对象

3、clear解释:
该属性的值指出了不允许有浮动对象的边情况,又对象左边不允许有浮动、右边不允许有浮动、不允许有浮动对象。

4、css结构
div{clear:left}
div{clear:right}
div{clear:both}

Correcting teacher:查无此人Correction time:2019-05-05 09:21:10
Teacher's summary:完成的不错。漂浮一般在手机网页上用到比较多。继续加油。

Release Notes

Popular Entries