Comments (7)
clientTop
: 一个元素顶部边框的宽度(以像素表示)HTMLElement.offsetParent
:- 指向最近的包含该元素的
定位
元素。 - 如果没有定位的元素,则
offsetParent
为最近的table, table cell
或根元素
(标准模式下为 html;quirks 模式下为 body)。 - 当元素的 style.display 设置为 "none" 时,
offsetParent
返回null
。 offsetParent
很有用,因为offsetTop
和offsetLeft
都是相对于其内边距边界的
- 指向最近的包含该元素的
from blog.
-
offsetLeft,offsetTop
: 相对于offsetParent
元素的距离,而offsetParent
指的是一个元素最近的父级定位元素
,如果没有定位元素就是文档根节点
-
offsetLeft,offsetTop
: 当前元素左上角相对于HTMLElement.offsetParent
节点的左边界偏移的像素值
from blog.
MouseEvent.offsetX / Y
- 事件对象与目标节点的内填充边(padding edge)在 X 轴方向上的偏移量
from blog.
from blog.
from blog.
from blog.
from blog.
Related Issues (20)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.