このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

SVGFEDisplacementMapElement: 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月.

widthSVGFEDisplacementMapElement インターフェイスの読み取り専用プロパティで、SVG フィルタープリミティブの水平サイズを SVGAnimatedLength で記述します。

これは <feDisplacementMap> 要素の width フィルタープリミティブ属性を反映します。この属性は <length> またはこのフィルター領域の幅に対する <percentage> です。デフォルト値は 100% です。このプロパティの値は、ユーザー座標系単位における長さです。

SVGAnimatedLength です。

js
const feDisplacementMap = document.querySelector("feDisplacementMap");
const horizontalSize = feDisplacementMap.width;
console.log(horizontalSize.baseVal.value); // `width` の値

仕様書

Specification
Filter Effects Module Level 1
# dom-svgfilterprimitivestandardattributes-width

ブラウザーの互換性

関連情報