Skip to content

Instantly share code, notes, and snippets.

@leechy
Created December 19, 2012 07:58
Show Gist options
  • Save leechy/4335151 to your computer and use it in GitHub Desktop.
Save leechy/4335151 to your computer and use it in GitHub Desktop.
AppStore Badge with SVG and fallback to png
/**
* AppStore Badge with SVG and fallback to png
*/
.b-download__app-store-badge {
display: inline-block;
background: url('http://www.leechy.ru/inn/appstore-en.png') no-repeat;
background: none, url('http://www.leechy.ru/inn/appstore-en.svg') no-repeat;
background-size: 100% 100%;
width: 135px;
height: 40px;
}
.b-download__app-store {
background: url('http://www.leechy.ru/inn/appstore-en.png') no-repeat;
width: 135px;
height: 40px;
}
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
<p><span class="b-download__app-store-badge"></span></p>
<p><img src="http://www.leechy.ru/inn/appstore-en.svg" class="b-download__app-store"></p>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
@ahmedbasraa
Copy link

Your Image Links are Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment