Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(html)clientHeight、offsetHeight、scrollTop、offsetHeight等 #26

Open
Zhengy1995 opened this issue Mar 20, 2020 · 0 comments
Open

(html)clientHeight、offsetHeight、scrollTop、offsetHeight等 #26

Zhengy1995 opened this issue Mar 20, 2020 · 0 comments

Comments

@Zhengy1995
Copy link
Owner

  1. clientHeight
    元素内部(即边界以内)可视高度
  2. scrollHeight
    元素内部实际高度(包含子元素超出且看不见的部分)
  3. offsetHeight
    元素外部高度(即内部高度+边界宽度)
  4. scrollTop
    元素的滚动高度,若没有滚动,则为0
  5. offsetTop
    元素内部(边界以内)顶部到其父元素顶部的距离
  6. clientTop
    容器内部相对于容器本身的top偏移,实际就是border-top的宽度
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant