jQuery学习笔记——尺寸
jQuery——尺寸
6个方法:
.width(); //宽度,不包括内边距、边框或外边距
.height();//高度,不包括内边距、边框或外边距
.innerWidth(); //宽度,包括内边距
.innerHight(); //高度,包括内边距
.outerWidth(); //宽度,包括内边距和边框
.outerHeight(); //高度,包括内边距和边框
.outerWidth(true); //宽度,包括内边距、边框或外边距
.outerHeight(true); //高度,包括内边距、边框或外边距
例: 指定元素的高度和宽度
$("div1").width(500).height(300);