W3cubDocs

/Web APIs

SVGFEDistantLightElement: elevation property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

The elevation read-only property of the SVGFEDistantLightElement interface reflects the elevation attribute of the given <feDistantLight> element.

Value

An SVGAnimatedNumber object.

Examples

>

Accessing the elevation Property

<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <filter id="lightingFilter">
      <feDistantLight azimuth="45" elevation="30" />
      <feDiffuseLighting result="light" lighting-color="white" surfaceScale="2">
        <feDistantLight azimuth="45" elevation="30" />
      </feDiffuseLighting>
    </filter>
  </defs>
  <rect
    x="50"
    y="50"
    width="100"
    height="100"
    fill="yellow"
    filter="url(#lightingFilter)" />
</svg>
const distantLight = document.querySelector("feDistantLight");

console.log(distantLight.elevation.baseVal); // Output: 30

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android WebView on iOS
elevation 5 12 3 ≤12.1 6 18 4 ≤12.1 6 1.0 4.4 6

See also

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDistantLightElement/elevation