Jquery 的outerHeight方法使用介绍
2013-09-11 00:00
519 查看
获取第一个匹配元素外部高度(默认包括补白和边框)。
此方法对可见和隐藏元素均有效。
outerHeight(options)
optionsBoolean默认值:'false'
设置为 true 时,计算边距在内。
描述:
获取第一段落外部高度。
HTML 代码:
jQuery 代码:
结果:
此方法对可见和隐藏元素均有效。
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 $.trim()方法使用介绍
- jQuery事件 delegate()使用方法介绍
- jquery选择器原理介绍($()使用方法)
- jquery.ajax之beforeSend方法使用介绍
- jquery $(this).attr $(this).val方法使用介绍
- jQuery 自定义网页滚动条样式插件 mCustomScrollbar 的介绍和使用方法
- jquery中ajaxfrom插件的使用方法介绍
- jquery $(this).attr $(this).val方法使用介绍
- jQuery事件 delegate()使用方法介绍
- AMD异步模块定义介绍和Require.js中使用jQuery及jQuery插件的方法
- AMD异步模块定义介绍和Require.js中使用jQuery及jQuery插件的方法
- jQuery动画animate方法使用介绍
- AMD异步模块定义介绍和Require.js中使用jQuery及jQuery插件的方法
- jQuery 自定义网页滚动条样式插件 mCustomScrollbar 的介绍和使用方法
- jQuery 选择器多个使用方法介绍
- jquery $.trim()方法使用介绍
- AMD异步模块定义介绍和Require.js中使用jQuery及jQuery插件的方法
- jQuery过滤选择器:not()方法使用介绍