zoukankan      html  css  js  c++  java
  • 关于clientWidth、offsetWidth、clientHeight、offsetHeigh

    对clientWidth、offsetWidth、clientHeight、offsetHeigh有时候就是搞不清楚,在网络上找到的别人的总结:
    引用内容

    IE6.0、FF1.06+:
    clientWidth = width + padding
    clientHeight = height + padding
    offsetWidth = width + padding + border
    offsetHeight = height + padding + border
    IE5.0/5.5:
    clientWidth = width - border
    clientHeight = height - border
    offsetWidth = width
    offsetHeight = height
    (CSS中的margin属性,与clientWidth、offsetWidth、clientHeight、offsetHeight均无关)
  • 相关阅读:
    Binary Tree Paths
    Implement Stack using Queues
    Path Sum II
    Path Sum
    Plus One
    Add Digits
    Missing Number
    H-Index II
    H-Index
    Ugly Number II
  • 原文地址:https://www.cnblogs.com/top5/p/1862733.html
Copyright © 2011-2022 走看看