In distinction jquery innerWidth (), outerWidth (), outerWidth (true) and width () of

 

var a = width of the element itself;

width() = a;

innerWidth() = a+padding;

outerWidth() = a+padding+border;

outerWidth(true) = a+padding+border+margin;

Therefore: For the same element should be: 
width () <= The innerWidth () <= the outerWidth () <= the outerWidth (to true);

var a = width of the element itself;

width() = a;

innerWidth() = a+padding;

outerWidth() = a+padding+border;

outerWidth(true) = a+padding+border+margin;

Therefore: For the same element should be: 
width () <= The innerWidth () <= the outerWidth () <= the outerWidth (to true);

Guess you like

Origin www.cnblogs.com/chm-blogs/p/11525769.html