polyfill-svg-bg
v0.1.1-x
Published
Polyfill for IE to set SVG to CSS `background-image`.
Downloads
1
Readme
Polyfill SVG as BG for IE
Use polyfillSvgUri instead of this.
This project was altered to polyfillSvgUri.
Polyfill for IE to set SVG to CSS background-image
.
The plain SVG without Base64 encoding that is written in the CSS background-image
is small size, readable and editable.
div {
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96"><path d="M10,10L32,90L90,32z" fill="lightgreen"/></svg>') center no-repeat;
}
But IE ignores it.
This polyfill solves that problem. It passes encoded SVG to IE.
Usage
<script src="polyfill-svg-bg.min.js"></script>