Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
Created June 27, 2010 22:39
Show Gist options
  • Select an option

  • Save subtleGradient/455227 to your computer and use it in GitHub Desktop.

Select an option

Save subtleGradient/455227 to your computer and use it in GitHub Desktop.
<div style='background-image: url(&#x27; data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg"><rect fill="#F00" width="100%" height="100%" rx="100%"/></svg> &#x27;);padding: 2em;display: inline-block;text-align: center;'>
I haz a circular!
</div>
@subtleGradient

Copy link
Copy Markdown
Author

Use the &#x27; to keep from having to escape all the quotes in the SVG. This allows for copy & pastable SVG into yer CSS!

I have no idea what browsers can actually read this.

@subtleGradient

Copy link
Copy Markdown
Author

(Working example)[http://jsfiddle.net/mkk2X/]

@subtleGradient

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment