微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – 究竟是什么显示:block;做一个元素?

显示的具体规格是什么?我知道很多具体的东西应用到一个元素会做,但我想听到他们的一切.

谢谢.

解决方法

Quote from W3C

In a block formatting context,Boxes are laid out one after the other,vertically,beginning at the top of a containing block. The vertical distance between two sibling Boxes is determined by the ‘margin’ properties. Vertical margins between adjacent block Boxes in a block formatting context collapse.

In a block formatting context,each Box’s left outer edge touches the left edge of the containing block (for right-to-left formatting,right edges touch). This is true even in the presence of floats (although a Box’s content area may shrink due to the floats).

原文地址:https://www.jb51.cc/css/217148.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。