-
尺寸
- height([val|fn])———取得匹配元素当前计算的高度值(px)。
-
$("p").height();
- width([val|fn])————取得第一个匹配元素当前计算的宽度值(px)。
-
$("p").width();
- innerHeight()———获取第一个匹配元素内部区域高度(包括补白、不包括边框)。此方法对可见和隐藏元素均有效。
-
var p = $("p:first"); $("p:last").text( "innerHeight:" + p.innerHeight() );
- innerWidth()————获取第一个匹配元素内部区域宽度(包括补白、不包括边框)。此方法对可见和隐藏元素均有效
-
var p = $("p:first"); $("p:last").text( "innerWidth:" + p.innerWidth() );
- outerHeight([options])————获取第一个匹配元素外部高度(默认包括补白和边框)。此方法对可见和隐藏元素均有效。
-
var p = $("p:first"); $("p:last").text( "outerHeight:" + p.outerHeight() + " , outerHeight(true):" + p.outerHeight(true) );
- outerWidth([options])————获取第一个匹配元素外部宽度(默认包括补白和边框)。此方法对可见和隐藏元素均有效
-
var p = $("p:first"); $("p:last").text( "outerWidth:" + p.outerWidth() + " , outerWidth(true):" + p.outerWidth(true) );
CSS—尺寸
最新推荐文章于 2024-09-09 09:01:46 发布