DOMRect: Eigenschaft x

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Hinweis: Diese Funktion ist in Web Workers verfügbar.

Die x-Eigenschaft des DOMRect-Interfaces repräsentiert die x-Koordinate des Rechtecks, was die horizontale Entfernung zwischen dem linken Rand des Viewports und dem Ursprung des Rechtecks ist.

Wenn die Breite des Rechtecks nicht negativ ist, ist der horizontale Ursprung des Rechtecks der linke Rand des Viewports. Wenn die Breite negativ ist, ist der horizontale Ursprung des Rechtecks der rechte Rand des Viewports.

Wert

Ein double.

Spezifikationen

Specification
Geometry Interfaces Module Level 1
# dom-domrect-x

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
x

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch