Skip to content

Instantly share code, notes, and snippets.

@borisschapira
Created February 11, 2022 09:56
Show Gist options
  • Save borisschapira/087f24a2aa1b1d07d7ed517a74e94697 to your computer and use it in GitHub Desktop.
Save borisschapira/087f24a2aa1b1d07d7ed517a74e94697 to your computer and use it in GitHub Desktop.
SVG filter for white drop shadow
Display the source blob
Display the rendered blob
Raw
<filter id="dropshadow" x="0" y="0" width="200%" height="200%">
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" result="matrix"/>
<feGaussianBlur in="matrix" stdDeviation="3"/>
<feComponentTransfer>
<feFuncA type="linear" slope="1"/>
</feComponentTransfer>
<feMerge>
<feMergeNode/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment