多个浏览器对容器宽度实际像素的解释

(编辑:jimmy 日期: 2024/11/1 浏览:2)

IE/Opera:

对象的实际宽度 = (margin-left) + width + (margin-right)

Firefox/Mozilla:

对象的实际宽度= (margin-left) + (border-left-width) + (padding- left) + width + (padding-right) + (border-right-width) + (margin-right)