display:block 的具体规范是什么?我知道将此应用于元素的很多具体操作,但我想听听所有这些。
谢谢。
最佳答案
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).
关于css - 显示:block; do to an element?到底是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/633827/