Home > Article > Web Front-end > A brief analysis of several small changes in jQuery1.8_jquery
1. .width() and .height() methods
1.8 adds support for the css attribute box-sizing. Please note the difference from 1.7.2. In versions 1.7.2 and earlier, regardless of whether box-sizing is defined: border-box returns the width or height of the element content in the box model, excluding padding and border.
It is different after 1.8. When the css attribute box-sizing: box-border is set, the value returned by using width() may be different from the value set in css. For example,