Jquery 的outerHeight方法使用介绍
此方法对可见和隐藏元素均有效。
outerHeight(options)
optionsBoolean默认值:'false'
设置为 true 时,计算边距在内。
描述:
获取第一段落外部高度。
HTML 代码:
<p>Hello</p><p>2nd Paragraph</p>
jquery 代码:
var p = $("p:first");
$("p:last").text( "outerHeight:" + p.outerHeight() + " , outerHeight(true):" + p.outerHeight(true) );
结果:
<p>Hello</p><p>outerHeight: 35 , outerHeight(true):55</p>
您可能感兴趣的文章:
Jquery 的outerHeight方法使用介绍
jquery的outerHeight方法与outerWidth方法
关于jquery css的使用介绍
jQuery帮助之CSS尺寸(五)outerHeight、outerWidth
jQuery获取浏览器中的分辨率实现代码
jquery div 居中技巧应用介绍
jQuery 位置函数offset,innerWidth,innerHeight,outerWidth,outerHeight,scrollTop,scrollLeft
文本有关的样式和jQuery求对象的高宽问题分别说明
浅析jQuery1.8的几个小变化
基于jQuery实现的水平和垂直居中的div窗口