Last active
August 24, 2021 05:22
-
-
Save bagerathan/4500c09ad4062fdc92b940e7add6ef11 to your computer and use it in GitHub Desktop.
[SVG in background] #css #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
body { | |
background-image: | |
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><linearGradient id='gradient'><stop offset='10%' stop-color='%23F00'/><stop offset='90%' stop-color='%23fcc'/> </linearGradient><rect fill='url(%23gradient)' x='0' y='0' width='100%' height='100%'/></svg>"); | |
} | |
/* | |
Note that the SVG content needs to be url-escaped for this to work, e.g. # gets replaced with %23. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment