-
-
Save acorcutt/5673291 to your computer and use it in GitHub Desktop.
SVG with fallbacks
This file contains 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
/* browsers that support svg support multiple bg those that dont browsers will fallback to image */ | |
.css{ | |
background: url('image.png'); | |
background: none, url('vector.svg'); | |
} | |
Most modernd browsers support svg in images, just use conditional comments to serve images instead for old IE | |
<!--[if lte IE 8]><img src="logo.png" /><![endif]--> | |
<!--[if gt IE 8]><img src="logo.svg" /><![endif]--> | |
<!--[if !IE]> --><img src="logo.svg" /><!-- <![endif]--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment