1. 程式人生 > >寬和高

寬和高

css('height') 和 .height()之間的區別是後者返回一個沒有單位的數值,前者是返回帶有完整單位的字串。當一個元素的高度需要數學計算的時候推薦使用.height() 方法 。
1、.Height() =height;
2、.innerHeight() = height+padding;
3、.outerHeight() = height+padding+border;
4、.outerHeight(true) =height+padding+border+margin;