Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Created February 5, 2013 10:47
Show Gist options
  • Save Chrisedmo/4713683 to your computer and use it in GitHub Desktop.
Save Chrisedmo/4713683 to your computer and use it in GitHub Desktop.
Great SVG fallback technique as per this article: http://dbushell.com/2013/02/04/a-primer-to-front-end-svg-hacking/
/* Needs Modernizr obv… */
.lt-ie9 #logo,
.no-svg #logo {
background: url("logo.png");
_background-image: url("logo.gif");
}
.lt-ie9 #logo img,
.no-svg #logo img {
opacity: 0;
filter: alpha(opacity=0);
}
<div id="logo">
<img src="logo.svg">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment