Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seanbarclay/8627991 to your computer and use it in GitHub Desktop.
Save seanbarclay/8627991 to your computer and use it in GitHub Desktop.
<filter id="InnerShadowExample">
<!-- Shadow Offset -->
<feOffset
dx='5'
dy='5'
/>
<!-- Shadow Blur -->
<feGaussianBlur
stdDeviation='3'
result='offset-blur'
/>
<!-- Invert the drop shadow to create an inner shadow -->
<feComposite
operator='out'
in='SourceGraphic'
in2='offset-blur'
result='inverse'
/>
<!-- Color & Opacity -->
<feFlood
flood-color='black'
flood-opacity='0.75'
result='color'
/>
<!-- Clip color inside shadow -->
<feComposite
operator='in'
in='color'
in2='inverse'
result='shadow'
/>
<!-- Put shadow over original object -->
<feComposite
operator='over'
in='shadow'
in2='SourceGraphic'
/>
</filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment