Skip to content

Instantly share code, notes, and snippets.

@juliandavidmr
Last active November 25, 2018 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandavidmr/913117ede2870ffd53938dbb89f99424 to your computer and use it in GitHub Desktop.
Save juliandavidmr/913117ede2870ffd53938dbb89f99424 to your computer and use it in GitHub Desktop.
<svg>
<filter id="dropshadow" height="130%">
<feGaussianBlur in="SourceAlpha" stdDeviation="3"></feGaussianBlur> <!-- stdDeviation is how much to blur -->
<feOffset dx="2" dy="2" result="offsetblur"></feOffset> <!-- how much to offset -->
<feComponentTransfer>
<feFuncA type="linear" slope="0.5"></feFuncA> <!-- slope is the opacity of the shadow -->
</feComponentTransfer>
<feMerge>
<feMergeNode></feMergeNode> <!-- this contains the offset blurred image -->
<feMergeNode in="SourceGraphic"></feMergeNode> <!-- this contains the element that the filter is applied to -->
</feMerge>
</filter>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment