-
-
Save streetalchemist/b1363925c0d9947d403c to your computer and use it in GitHub Desktop.
SVG Filter Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |
width="227px" height="197px" viewBox="0 0 227 197" enable-background="new 0 0 227 197" xml:space="preserve"> | |
<defs> <!-- Placed just after your opening svg element --> | |
<filter width="200%" height="200%" x="0" y="0" id="blurrydropshadow"> | |
<feOffset in="SourceAlpha" result="offOut" dy="10" dx="10"></feOffset> | |
<feGaussianBlur in="offOut" result="blurOut" stdDeviation="7"></feGaussianBlur> | |
<feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend> | |
</filter> | |
<filter width="200%" height="200%" x="0" y="0" id="soliddropshadow"> | |
<feOffset in="SourceAlpha" result="offOut" dy="10" dx="10"></feOffset> | |
<feBlend in="SourceGraphic" in2="offOut" mode="normal"></feBlend> | |
</filter> | |
</defs> | |
<polygon fill="#4C5BA9" filter="url(#soliddropshadow)" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="113.161,24.486 135.907,70.576 | |
186.77,77.966 149.965,113.843 158.654,164.5 113.161,140.583 67.667,164.5 76.356,113.843 39.552,77.966 90.414,70.576 "/> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment