Results 41 - 60 of 61

Screen.pixelDepth

Returns the bit depth of the screen. Per CSSOM View, the value is always 24, for compatibility reasons.
API CSSOM View NeedsCompatTable NeedsMarkupWork NeedsSpecTable Property Reference Référence

Window.matchMedia()

Returns a new MediaQueryList object representing the parsed results of the specified media query string.
API CSSOM View Method NeedsMarkupWork NeedsSpecTable Reference Référence

Window.outerHeight

Window.outerHeight gets the height in pixels of the whole browser window. It represents the height of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.
API CSSOM View NeedsCompatTable NeedsContent NeedsMarkupWork Property Reference Référence

Window.screen

Returns a reference to the screen object associated with the window. The screen object, implementing the Screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered.
API CSSOM View DOM NeedsCompatTable NeedsMarkupWork NeedsSpecTable Property

Window.screenX

The Window.screenX read-only property returns the horizontal distance, in CSS pixels, of the left border of the user's browser from the left side of the screen.
API CSSOM View Property Read-only Reference Référence Window

Window.screenY

The Window.screenY read-only property returns the vertical distance, in CSS pixels of the top border of the user's browser from the top edge of the screen.
API CSSOM View Property Read-only Reference Référence Window

Window.scroll()

Scrolls the window to a particular place in the document.
API CSSOM View Method NeedsCompatTable NeedsMarkupWork Reference Référence

Window.scrollTo()

Scrolls to a particular set of coordinates in the document.
API CSSOM View Method NeedsCompatTable NeedsMarkupWork Reference Référence

Window.scrollX

Returns the number of pixels that the document has already been scrolled horizontally.
API CSSOM View NeedsBrowserCompatibility NeedsMarkupWork NeedsMobileBrowserCompatibility Property Reference Référence

Window.scrollY

Returns the number of pixels that the document has already been scrolled vertically.
API CSSOM View NeedsBrowserCompatibility NeedsMarkupWork NeedsMobileBrowserCompatibility Property Reference Référence

Determining the dimensions of elements

There are several properties you can look at in order to determine the width and height of elements, and it can be tricky to determine which is the right one for your needs. This article is designed to help you make that decision.  Note that all these properties are read-only.  If you want to set the width and height of an element, use  width and height; or, the overriding min-width and max-width, and min-height and max-height properties.
client height Client width CSSOM View Guide Intermediate NeedsCompatTable NeedsSpecTable offsetHeight offsetWidth size of displayed content

HTMLElement.offsetWidth

The HTMLElement.offsetWidth read-only property returns the layout width of an element. Typically, an element's offsetWidth is a measurement which includes the element borders, the element horizontal padding, the element vertical scrollbar (if present, if rendered) and the element CSS width.
API CSSOM View NeedsBrowserCompatibility NeedsMarkupWork NeedsMobileBrowserCompatibility Property Read-only Reference Référence

MediaQueryList

A MediaQueryList object maintains a list of media queries on a document, and handles sending notifications to listeners when the media queries on the document change.
API CSSOM View Experimental Expérimental Interface NeedsMarkupWork NeedsMobileBrowserCompatibility NeedsSplit Reference Référence

MouseEvent.clientX

The MouseEvent.clientX read-only property provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinates within the page). For example, clicking in the top-left corner of the client area will always result in a mouse event with a clientX value of 0, regardless of whether the page is scrolled horizontally.
API CSSOM View DOM DOM Events MouseEvent Property Read-only Reference Référence

MouseEvent.clientY

The MouseEvent.clientY read-only property returns the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinates within the page). For example, clicking in the top-left corner of the client area will always result in a mouse event with a clientY value of 0, regardless of whether the page is scrolled vertically.
API CSSOM View DOM Events MouseEvent Property Read-only Reference Référence