站长资源网页制作

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

整理:jimmy2024/12/28浏览2
简介IE/Opera: 对象的实际宽度 = (margin-left) + width + (margin-right) Firefox/Mozilla: 对象的实际宽度= (margin-left) + (border-left-width) + (padding- left) + width + (
IE/Opera:

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

Firefox/Mozilla:

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