Get started with svg4everybody CDN
CC0-1.0 licensed
SVG4Everybody: Lightweight library converting vector graphics to inline SVG for broader browser support.
Tags:- svgs
- sprites
- spritemaps
- symbols
- defs
- uses
- oldies
- ie8s
- ie9s
- safaris
- externals
- icons
- fallbacks
Stable version
Copied!
How to start using svg4everybody CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with svg4everybody CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.cdnhub.io/svg4everybody/2.1.9/svg4everybody.min.js"></script>
</head>
<body>
<button id="loadSVG">Load SVG</button>
<div id="svgContainer"></div>
<script>
$(document).ready(function() {
$('#loadSVG').click(function() {
svg4everybody({
selectors: 'svg:not([data-svg4everybody="processed"])'
});
});
});
</script>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" data-svg4everybody="processed">
<circle cx="50" cy="50" r="30" fill="blue" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" data-svg4everybody="">
<rect x="10" y="10" width="30" height="30" fill="red" />
</svg>
</body>
</html>
Copied!
Copied!
Copied!
Copied!