变换后容器的DOM宽度与变换前相同? 为什么? var theScale = aNumber;var containerWidth = theContainer.width();alert(containerWidth);// and the other prefixes, as welltheContainer.css("-webkit-transform", "scale(" + theScale
为什么?
var theScale = aNumber; var containerWidth = theContainer.width(); alert(containerWidth); // and the other prefixes, as well theContainer.css("-webkit-transform", "scale(" + theScale + ")"); containerWidth = theContainer.width(); alert(containerWidth); // the same value ???变换不会影响元素的布局 – 或者更确切地说是框模型.它们纯粹是化妆品.从 spec:
Note: Transformations do affect the visual layout on the canvas, but have no affect on the CSS layout itself. This also means transforms do not affect results of the Element Interface Extensions 07001 and 07002, which are specified in 07003.