CSS article CSSOM

Source: Internet
Author: User

CSSOM:

CSS object model, providing JS interface operation CSS Rule;

  document.stylesheets can view all the currently loaded CSS;

Window.outerwidth, outerheight the size of the entire browser (excluding the taskbar);

Window. Innerwidth, innerheight the size of the viewable area in the browser page, excluding: Menu bar, toolbar, debugger

Window.pagexoffset, pageyoffset the horizontal and vertical distance in the page scrolling

Window.screenx, ScreenY the position of the browser window in the display, screenX indicating the horizontal position, screenY indicating the vertical position

Window.screenleft, Screentop

Screen object:

Screen.width width and height of the height display;

Screen.availwidth, availheight monitor available width, height (excluding taskbar)

Screen.colordepth the color depth of the display, such as: 24

Screen.pixeldepth: 24

Elements: Element

OffsetParent The first ancestor positioning element (that is, the element used to calculate the above offsetLeft offsetTop );

Offsetleft, OffsetTop offset value relative to the nearest ancestor anchor element (CSS Position property is set to relative, absolute, or fixed element)

Offsetwidth, offsetheight the dimensions of the entire element (including the border)

ClientWidth, clientheight represents the height and width of the content area (including the padding size), but does not include borders and scroll bars

ClientLeft, the position of the upper-left corner of the ClientTop content area (including the padding size) relative to the upper-left corner of the entire element (including the border)

ScrollWidth, scrollheight the width and height of the entire content area, including hidden parts. If the element does not have a hidden part, then the relevant value should be used for clientWidth andclientHeight;(向下滚动滚动条的时候,scrollHeight应该等用于scrollTop + clientHeight)

Mouse Position: Event

E.screenx, ScreenY The offset of the mouse relative to the monitor screen

E.clientx, ClientY The offset of the mouse relative to the window

E.pagex, pagey The offset of the mouse relative to the document (there will be scroll bars)

E.OFFSETX, OffsetY The offset of the mouse relative to the currently clicked element

Information:

Cssom Chinese Information

CSS article CSSOM

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.