This is a simple demonstration of the right and wrong methods to display SVG backgrounds using our CSS output. The CSS output is a background-image
with a SVG converted to a data URI.
SVGBackgrounds.com outputs CSS code that will only work in a CSS file (style.css) or directly on an HTML webpage within style tags as shown directly below:
<style>
body{
*** paste code here ***
}
</style>
Do not use inline CSS.
The outputed SVG code consists of BOTH single and double quotes. The code will not play nice inside style attributes ( style=' xxxx '
or style=" xxxx "
) which rely on BOTH single and double quotes.
Inline CSS will not work, DO NOT use this method:
<div style=' *** code won't work here *** '></div>
Hey, I'm Matt , the creator behind SVG Backgrounds. I produce free and paid resources every month, sign up for alerts.