https://github.com/anseki/polyfill-svg-bg
Polyfill for IE to set SVG to CSS `background-image`.
https://github.com/anseki/polyfill-svg-bg
Last synced: over 1 year ago
JSON representation
Polyfill for IE to set SVG to CSS `background-image`.
- Host: GitHub
- URL: https://github.com/anseki/polyfill-svg-bg
- Owner: anseki
- License: mit
- Created: 2015-10-12T22:39:32.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T08:57:07.000Z (over 9 years ago)
- Last Synced: 2025-03-16T02:07:34.724Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# Polyfill SVG as BG for IE
***Use [polyfillSvgUri](https://github.com/anseki/polyfill-svg-uri) instead of this.***
**This project was altered to [polyfillSvgUri](https://github.com/anseki/polyfill-svg-uri).**
---
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.
```css
div {
background: url('data:image/svg+xml;utf8,') center no-repeat;
}
```
But IE ignores it.
This polyfill solves that problem. It passes encoded SVG to IE.
## Usage
```html
```