Created
July 30, 2012 10:38
-
-
Save LeaVerou/3206117 to your computer and use it in GitHub Desktop.
SVG noise (Warning: Might be slow!)
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
/** | |
* SVG noise (Warning: Might be slow!) | |
*/ | |
html { background: slategray; } | |
body { margin: 0 } |
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
<!-- Meant to be used as a CSS background through an external file or URLencoded data URI --> | |
<svg width="100%" height="100%"> | |
<defs> | |
<filter id="noise"> | |
<feTurbulence type="fractalNoise" baseFrequency=".7" /> | |
<feComponentTransfer> | |
<feFuncR type="linear" slope="2" intercept="-.5"/> | |
<feFuncG type="linear" slope="2" intercept="-.5"/> | |
<feFuncB type="linear" slope="2" intercept="-.5"/> | |
</feComponentTransfer> | |
<feColorMatrix type="saturate" values="0"/> | |
<feComponentTransfer> | |
<feFuncA type="table" tableValues="0 .3"/> | |
</feComponentTransfer> | |
</filter> | |
</defs> | |
<rect width="100%" height="100%" filter="url(#noise)" /> | |
</svg> |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment