SVGRect: width-Eigenschaft

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.

Die width-Eigenschaft der SVGRect-Schnittstelle ist ein Alias für die DOMRect.width-Eigenschaft. Sie beschreibt die horizontale Größe des Elements. Sie spiegelt das width-Attribut des SVG-Elements und die CSS-width-Eigenschaft wider.

Die Breite ist eine Länge; sie ist der Abstand von der linken Seite des Elements bis zur rechten Seite des Elements im Benutzerkoordinatensystem. Ihre Syntax entspricht der von <length>.

Nutzungskontext

Name width
Wert <length> | <percentage>
Initial 0
Anwendbar auf <mask>, <svg>, <rect>, <image>, <foreignObject>
Vererbt nein
Prozentangaben beziehen sich auf die Größe des SVG-Viewports
Medien visuell
Berechneter Wert absolute Länge oder Prozentsatz
Animierbar ja

Spezifikationen

No specification found

No specification data found for api.SVGRect.width.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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
width

Legend

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

Full support
Full support

Siehe auch