How come:
svg html: https://jsfiddle.net/sy51gvr6/
Set as a background image is not working? https://jsfiddle.net/s7z1xjcL/2/
Why is it not working?
I am confused and donāt understand why it is not.
background-image: url('data:image/svg+xml,<svg width="165" height="165" viewBox="0 0 165 165"><rect x="80" y="80" width="10" height="10" style="stroke: rgb(0, 0, 0); stroke-width: 0px; fill: rgb(17, 85, 204);" /><rect x="72.5" y="72.5" width="25" height="25" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="62.5" y="62.5" width="45" height="45" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="52.5" y="52.5" width="65" height="65" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="42.5" y="42.5" width="85" height="85" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="32.5" y="32.5" width="105" height="105" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="22.5" y="22.5" width="125" height="125" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="12.5" y="12.5" width="145" height="145" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /><rect x="2.5" y="2.5" width="165" height="165" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" /></svg>');
background-size: 165px 165px;
}
<svg width="165" height="165" viewBox="0 0 165 165">
<rect x="80" y="80" width="10" height="10" style="stroke: rgb(0, 0, 0); stroke-width: 0px; fill: rgb(17, 85, 204);" />
<rect x="72.5" y="72.5" width="25" height="25" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="62.5" y="62.5" width="45" height="45" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="52.5" y="52.5" width="65" height="65" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="42.5" y="42.5" width="85" height="85" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="32.5" y="32.5" width="105" height="105" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="22.5" y="22.5" width="125" height="125" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="12.5" y="12.5" width="145" height="145" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
<rect x="2.5" y="2.5" width="165" height="165" style="fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);" />
</svg>
This way does not work either:
https://jsfiddle.net/y0u79de4/
body {
background-image: url("data:image/svg+xml,%3Csvg width='165' height='165' viewBox='0 0 165 165'%3E%3Crect x='80' y='80' width='10' height='10' style='stroke: rgb(0, 0, 0); stroke-width: 0px; fill: rgb(17, 85, 204);' /%3E%3Crect x='72.5' y='72.5' width='25' height='25' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='62.5' y='62.5' width='45' height='45' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='52.5' y='52.5' width='65' height='65' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='42.5' y='42.5' width='85' height='85' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='32.5' y='32.5' width='105' height='105' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='22.5' y='22.5' width='125' height='125' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='12.5' y='12.5' width='145' height='145' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3Crect x='2.5' y='2.5' width='165' height='165' style='fill: none; stroke-width: 5px; stroke: rgb(17, 85, 204);' /%3E%3C/svg%3E");
}