innerheight() ,outerheight()和height()的区别

快乐打工仔 分类:实例代码

关于标题中三个方法的具体用法可以参阅下面三篇文章:

(1).jQuery innerHeight()一章节。

(2).jQuery outerHeight()一章节。

(3).jQuery height()一章节。

区别其实非常简单,下面就简单总结一下:

(1).height() :height;

(2).innerheight() :height+padding;

(3).outerheight() :height+padding+border;

(4).outerheight(true) :height+padding+border+margin;

通过上面的对比是不是就很清晰了。

innerheight() ,outerheight()和height()的区别,这样的场景在实际项目中还是用的比较多的,关于innerheight() ,outerheight()和height()的区别就介绍到这了。

innerheight() ,outerheight()和height()的区别属于前端实例代码,有关更多实例代码大家可以查看

回复

我来回复
  • 暂无回复内容