javascript里面的确一些关于Width,Height,Top,Left的问题

对于javascript里面的一些这方面的东西,每次看程序,自己写程序的时候遇到时都不知道是什么意思,今天特意找出来,看看虽然不明白,但还是要写出来
一.Client方面
1.clientHeight Read-only numeric value indicating the height of the element’s content area in pixels
2.clientLeft Read-only numeric value indicating the difference between the offsetLeft property and the beginning of the element’s content area, in pixels
3.clientTop Read-only numeric value indicating the difference between the offsetTop property and the beginning of the element’s content area, in pixels
4..clientWidth-only numeric value indicating the width of the element’s content area in pixels
二.offset方面
5.offsetHeight Read-only numeric value indicating the height of the element in pixels.
6.offsetLeft Read-only numeric value indicating the pixel offset of the left edge of the element, relative to its offsetParent
7.offsetParent
Read-only reference to the object relative to which the offsetHeight/Width/Left/Top is calculated
8.offsetTop Read-only numeric value indicating the pixel offset of the top edge of the element, relative to its offsetParent
9offsetWidth
Read-only numeric value indicating the width of the element in pixels
三.一般

position

Defines the type of positioning used for an element: static (default), absolute, relative, fixed, or inherit. Most often absolute is used to set the exact position of an element regardless of document flow.

Top

Defines the position of the object from the top of the enclosing region. For most objects, this should be from the top of the content area of the browser window.

Left

Defines the position of the object from the left of the enclosing region, most often the left of the browser window itself.

height

Defines the height of an element. With positioned items, a measure in pixels (px) is often used, though others like percentage (%) are also possible.

width

Defines the width of an element. With positioned items, a measure in pixels (px) is often used.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值