SVGRect: width プロパティ
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
width は SVGRect インターフェイスのプロパティで、 DOMRect.width プロパティの別名です。要素の水平方向のサイズを記述します。これは SVG 要素の width属性と CSS の width プロパティを反映します。
幅は長さであり、ユーザー座標系における要素の左端から右端までの距離です。構文は、 <length> と同じです。
使用コンテキスト
| 名前 | width |
|---|---|
| 値 |
<length> | <percentage>
|
| 初期値 | 0 |
| 適用先 |
<mask>,
<svg>,
<rect>,
<image>,
<foreignObject>
|
| 継承 | なし |
| パーセント値 | SVG ビューポートのサイズからの相対値 |
| メディア | 視覚 |
| 計算値 | 絶対長またはパーセント値 |
| アニメーション | 可 |
仕様書
| Specification |
|---|
| Geometry Interfaces Module Level 1> # dom-domrect-width> |