Skip to content

Instantly share code, notes, and snippets.

@acorcutt
Created May 29, 2013 19:53
Show Gist options
  • Save acorcutt/5673291 to your computer and use it in GitHub Desktop.
Save acorcutt/5673291 to your computer and use it in GitHub Desktop.
SVG with fallbacks
/* 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