@Ciro
You can break the embedded svg code with the backslash "\"
Tested with the code below in Chrome 54 and Firefox 50
body { background: transparent; background-attachment:fixed; background-image: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='170px' height='50px'> \ <rect x='0' y='0' width='170' height='50' style='stroke:white; fill:gray; stroke-opacity: 0.3; stroke-width: 3px; fill-opacity: 0.7; stroke-dasharray: 10 5; stroke-linecap=round; '/> \ <text x='85' y='30' style='fill:lightBlue; text-anchor: middle' font-size='16' transform='rotate(10,85,25)'>I love SVG!</text></svg>"); }
I even tested it,
background-image: url("\ data:image/svg+xml;utf8, \ <svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='170px' height='50px'> \ <rect x='0' y='0' width='170' height='50'\ style='stroke:white; stroke-width: 3px; stroke-opacity: 0.3; \ stroke-dasharray: 10 5; stroke-linecap=round; \ fill:gray; fill-opacity: 0.7; '/> \ <text x='85' y='30' \ style='fill:lightBlue; text-anchor: middle' font-size='16' \ transform='rotate(10,85,25)'> \ I love SVG! \ </text> \ </svg>\ ");
and it works (at least in Chrome 54 and Firefox 50 ==> in NWjs and Electron guarenteed)
Athmailer Nov 27 '16 at 22:49 2016-11-27 22:49
source share