JS in Clientwidth,offsetwidth,scrolltop and other meanings

Source: Internet
Author: User

1, offsetwidth the width of the current object
2, offsetheight the height of the current object
3. Offsetleft the distance from the current object to the left of its parent layer. It cannot be assigned a value. Set the distance to the left of the upper layer of the object, using the Style.left property.

4. OffsetTop the distance from the top edge of the current object to its parent layer. it cannot be assigned. Set the distance of the object to the top edge of the upper layer with the Style.top property

5. ScrollWidth: Gets the scrolling width of the object.

6. ScrollHeight: Gets the scrolling height of the object.

7. ScrollLeft: Sets or gets the distance between the left edge of the object and the leftmost of the currently visible content in the object (width+padding as a whole)

8. ScrollTop: Sets or gets the distance between the top of the object and the topmost of the visible content in the object; (height+padding as a whole)

9. ClientWidth: Gets the width of the object visible content, excluding the scroll bar, excluding the border;

10. ClientHeight: Gets the height of the object's visible content, excluding the scroll bar, not including the border;

11. ClientLeft: Gets the border width of the object

12. ClientTop: Gets the border height of the object

13, OffsetParent: The parent Layer object of the current object.

JS in Clientwidth,offsetwidth,scrolltop and other meanings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.