float:none和clear:none之间有什么区别 [英] Is there any difference between float: none and clear: none

查看:300
本文介绍了float:none和clear:none之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一些使用float和clear的东西。我发现没有使用 float:none; clear:none; 没有区别吗?

Float:none; 任何人都可以用一个例子来说明区别。



清除告诉其他元素是否应允许浮动,如果没有,允许两侧的浮子。这就是为什么当你使用 clear:both; 浮动停止。


I was doing a bit of stuff using float and clear. I found no difference using float: none; or clear: none; Is there any? can anybody illustrate the difference with an example

解决方案

Float:none; tells the elements that you do not wish for it to float.

Clear tells other elements whether they should be allowed to float or not, and in the case of none, you're allowing floats on both sides. it's why when you use clear:both; that floating stops.

这篇关于float:none和clear:none之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆