There are currently 3 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1241 2
JavaScript DOM对象的OffsetWidth和ClientWidth的区别
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 11/18/15 21:04
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 11/18/15 21:07
jQuery中的.width()和.height()分别等于60px和20px,因为padding是5px,所以这两个值既不包含边框,也不包含padding。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 3 Posted at: 11/18/15 21:09
CSS2对象的.style.width和.style.height很不靠谱,在这个例子中读取到的都是空字符串。
jQuery的.css("width")读到的值是60px,.css("height")是20px,这个和.width()和.height()结果是一样的。
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1241 Replies: 2
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 11/18/15 21:09
Announcements