Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
width は SVGForeignObjectElement インターフェイスの読み取り専用プロパティで、この <foreignObject> 要素の幅を記述します。これは、<foreignObject> 要素の width 属性の計算値を反映します。
この属性の値は <length>、<percentage>、<number> のいずれかです。SVGAnimatedLength.baseVal の値は、ユーザー座標系における <foreignObject> 要素の幅です。
次の SVG があったとします。
うぃdth 属性の計算値には、次のようにアクセスできます。
| Scalable Vector Graphics (SVG) 2 # __svg__SVGForeignObjectElement__width |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年3月31日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.