-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
about float #203
Comments
https://www.w3.org/TR/CSS22/visuren.html#floats
在『float 元素』之前或者之后创建的『block 元素』在布局时是认为『float 元素』不存在的;但是该『block 元素』中的『line box』会尽可能的缩短以适应『float 元素』的边缘。 |
https://www.w3.org/TR/CSS22/visuren.html#floats
不同于上一条,『BFC 元素』不能与『float 元素』重叠。当『float 元素』后面跟着『BFC 元素时』,有两种结果:
|
关于 float 的放置规则:https://www.w3.org/TR/CSS22/visuren.html#propdef-float
总之就是:向左浮动的尽可能像左靠,向右浮动的尽可能向右靠。靠上要优先于靠左或靠右
看 case demo: https://codepen.io/teazean/pen/WzoJyK
The text was updated successfully, but these errors were encountered: