<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="offsetFilter">
<!-- Applies an offset to the SourceGraphic -->
<feOffset in="SourceGraphic" dx="15" dy="10" />
</filter>
</defs>
<rect
x="20"
y="20"
width="100"
height="100"
fill="lightblue"
filter="url(#offsetFilter)" />
</svg>SVGFEOffsetElement: dx property / notebook
SVGFEOffsetElement: dx property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
// Select the feOffset element
const offsetElement = document.querySelector("feOffset");
// Access the dx property
console.log(offsetElement.dx.baseVal); // Output: 15