The CSSOM view API lets you manipulate the visual view of a document, including getting the position of element layout boxes, obtaining the width or height of the viewport through script, and also scrolling an element.
The coordinate systems used to specify a position in a display context such as a window on a monitor, a viewport on a mobile device, or a position on a sheet of paper when printing.
The concept of the viewport — what it is, its impact in terms of CSS, SVG, and mobile devices — and the difference between the visual viewport and the layout viewport.
This module adds properties, methods, and events to interfaces defined in other specifications.
devicePixelRatioinnerHeightinnerWidthmatchMedia()moveBy()moveTo()outerHeightouterWidthpageXOffset (see scrollX)pageYOffset (see scrollY)resizeBy()resizeTo()screenscreenLeftscreenTopscreenXscreenYvisualViewportscroll()scrollBy()scrollTo()scrollXscrollYresize eventcheckVisibility()clientHeightclientLeftclientTopclientWidthcurrentCSSZoomgetBoundingClientRect()getClientRects()scroll()scrollBy()scrollHeightscrollIntoView()scrollLeftscrollTo()scrollTopscrollWidthscroll eventscrollend eventThis module defines geometric utility methods that apply to the Text, Element, CSSPseudoElement, and Document interfaces. These GeometryUtils features are not yet implemented in any browser.
| Specification |
|---|
| CSSOM View Module> |
zoom<meta>
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CSSOM_view_API