对我来说,同时指定 bottom
和 margin-bottom
似乎是矛盾的。因为两者都是指定元素与周围元素/容器之间缩进的方法。也就是说,bottom
应该从边框开始测量,否则它的缩进量是从缩进量开始的。有谁知道规范要说什么?
最佳答案
bottom
属性“指定框的底部边距边缘在框的包含 block 底部上方的偏移量” 1 。和
The margin edge surrounds the box margin. If the margin has 0 width, the margin edge is the same as the border edge. The four margin edges define the box's margin box."2
所以是的,规范说 bottom
是从边缘开始测量的。
关于html - html 规范是否说明同时指定 bottom 和 margin-bottom 时会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23684740/