宽和高

css('height') 和 .height()之间的区别是后者返回一个没有单位的数值,前者是返回带有完整单位的字符串。当一个元素的高度需要数学计算的时候推荐使用.height() 方法 。
1、.Height() =height;
2、.innerHeight() = height+padding;
3、.outerHeight() = height+padding+border;
4、.outerHeight(true) =height+padding+border+margin;

猜你喜欢

转载自www.cnblogs.com/hyx626/p/9882373.html