SVG in CSS with PNG fallback
How do I make an svg in css with png fallback?
What is a svg in css with png fallback? How do you make a svg in css with png fallback? This script and codes were developed by Martin Michálek on 29 September 2022, Thursday.
SVG in CSS with PNG fallback - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SVG in CSS with PNG fallback</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>SVG in CSS with PNG fallback</h1>
<p class="icon icon-twitter"></p>
<p class="icon icon-facebook"></p> <script src="js/index.js"></script>
</body>
</html>
SVG in CSS with PNG fallback - Script Codes CSS Codes
.icon { width: 200px; height: 200px; display: inline-block; margin: 0 10px 10px 0; background-repeat: none; background-position: center center; background-size: contain;
}
.icon-twitter { background-image: url('http://www.vzhurudolu.cz/data/assets/twitter.svg');
}
.no-svg .icon-twitter { background-image: url('http://www.vzhurudolu.cz/data/assets/twitter.png');
}
.icon-facebook { background-image: url('http://www.vzhurudolu.cz/data/assets/facebook.svg');
}
.no-svg .icon-facebook { background-image: url('http://www.vzhurudolu.cz/data/assets/facebook.png');
}
SVG in CSS with PNG fallback - Script Codes JS Codes
if (!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1")) { document.documentElement.className = "no-svg";
}
Developer | Martin Michálek |
Username | machal |
Uploaded | September 29, 2022 |
Rating | 3 |
Size | 1,811 Kb |
Views | 16,192 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSS3 Background Size with gradient | 1,659 Kb |
Lazy loading with Unveil.js | 2,389 Kb |
History.JS demo | 1,788 Kb |
CSS3 Border Image with gradient | 1,665 Kb |
CSS3 Media Queries demo | 1,824 Kb |
CSS3 Linear Gradient | 1,823 Kb |
LESS mixin for font-size in rem units with pixels fallback | 1,657 Kb |
SVG Star Ratings with Partially Filled Star | 2,397 Kb |
CSS3 Radial Gradient | 2,120 Kb |
CSS3 Border Radius demo | 1,859 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Pattern lab logo | TimPietrusky | 3,666 Kb |
A Pen by Shidhin | Shidhincr | 5,015 Kb |
Spilled Paint | Darrylhuffman | 3,894 Kb |
Sticky notes with CSS3 | HaiNguyen007 | 2,146 Kb |
Canvas Fireworks | Jackrugile | 6,200 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Spinners using Font Icons | Keyamoon | 3,007 Kb |
Formations | Cantelope | 5,731 Kb |
The Rope | Chribbe | 2,886 Kb |
This in constructor context | _shree33 | 1,718 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!