Created
May 23, 2021 20:36
-
-
Save frankyonnetti/5cf23155f5e8d86df160859319daf292 to your computer and use it in GitHub Desktop.
SVG - in html #svg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- object embed --> | |
<object data="your.svg" type="image/svg+xml"> | |
<img src="yourfallback.jpg" /> | |
</object> | |
<!-- img tag --> | |
<img src="your.svg" onerror="this.src='your.png'"> | |
<!-- css --> | |
div { | |
background-image: url(fallback.png); | |
background-image: url(your.svg), none; | |
} | |
<!-- | |
Or simply paste the SVG xml into the HTML. | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment