Skip to content

Instantly share code, notes, and snippets.

@benjamincharity
Created January 9, 2012 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjamincharity/1581500 to your computer and use it in GitHub Desktop.
Save benjamincharity/1581500 to your computer and use it in GitHub Desktop.
Clean Home Button
/**
* Clean Home Button
*/
body {
text-align: center;
}
a {
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #ffffff), color-stop(100%, #e5e5e5)), -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #6d8a18), color-stop(100%, #6d8a18));
background: -webkit-linear-gradient(bottom, #ffffff, #e5e5e5), -webkit-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -moz-linear-gradient(bottom, #ffffff, #e5e5e5), -moz-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -o-linear-gradient(bottom, #ffffff, #e5e5e5), -o-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -ms-linear-gradient(bottom, #ffffff, #e5e5e5), -ms-linear-gradient(bottom, #6d8a18, #6d8a18);
background: linear-gradient(bottom, #ffffff, #e5e5e5), linear-gradient(bottom, #6d8a18, #6d8a18);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-ms-border-radius: 3px;
-khtml-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: inset white 0px -1px 0px, inset rgba(51, 51, 51, 0.1) 0 1px 1px;
-webkit-box-shadow: inset white 0px -1px 0px, inset rgba(51, 51, 51, 0.1) 0 1px 1px;
-o-box-shadow: inset white 0px -1px 0px, inset rgba(51, 51, 51, 0.1) 0 1px 1px;
box-shadow: inset white 0px -1px 0px, inset rgba(51, 51, 51, 0.1) 0 1px 1px;
display: inline-block;
color: #c8c8c8;
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif;
font-size: 15px;
padding: 11px;
position: relative;
margin: 120px auto 0;
}
a span {
background: top, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f0f0f0), color-stop(100%, #ffffff));
background: top, -webkit-linear-gradient(#f0f0f0, #ffffff);
background: top, -moz-linear-gradient(#f0f0f0, #ffffff);
background: top, -o-linear-gradient(#f0f0f0, #ffffff);
background: top, -ms-linear-gradient(#f0f0f0, #ffffff);
background: top, linear-gradient(#f0f0f0, #ffffff);
border: 3px solid white;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: 0 4px 8px 0 #666666;
-webkit-box-shadow: 0 4px 8px 0 #666666;
-o-box-shadow: 0 4px 8px 0 #666666;
box-shadow: 0 4px 8px 0 #666666;
display: inline-block;
padding: 8px 10px 8px 30px;
position: relative;
text-shadow: 0 1px 0 white;
}
a span::after {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAh9JREFUeNpsUk2rEmEYnRlHk/Hz6piphIuCuxLCWz+goDatbNHK2t1VtguSaBFBS/9ACzHBTRDML9C1BUURhN2VQkEpNaOOo+M40zkDc/vyhcPLPHPO83HeR/Q8T9hzxFarddFxnGP8f9lsNt8i5v5LkoX9J5rP5x+l0+m7i8XiwnA4vD8YDK4imYiY1mg0THC8fWK52+3eK5fLt7PZrDSfz28gwfNKpXI0m81+RKPRD+B83CcOtdvtW6VS6aGqqgqIQjgcjqdSqZubzUbACHoymTwAT+IYf4qlTqdzJZfLPS0UCiqFoihS7IPeRCIRIR6P/xYEBvV6vTJ+PCsWi4eKovjCv2aRZeJgOp2eJf9U3O/3U6FQ6DHavYa2BEmS/jcCYrSfX61Wx5qmnWMCsiKj0ehBJpO5AycFJNlrPxMmEgkBnOuo/gShM5xZQZCVddd1cyTiFmgQnsavyFmZlHEkMWKxWBi0GCt79XpdA+ETBTy88UQ67s+4p0Hctm0aN67Vaq+oo3il6/oXkKxg20hC1ZNqtfoCxr1fr9dC0JFpmjbe+ys+TYodkE382AbzkYTFMBB/YxjGt91udzo7CjhItmQN39btdisiKJFEUIyYC/FPwOF3ECcPoKuivyR4V8+yLHM8Htuo5AISxCbMYgJrMplslsulh25kzL+AP46/HMjCB88AR8AlgOtnAO+AE+A8cBlQAbbL3X4NfP8lwACSyS2PfDodJQAAAABJRU5ErkJggg==);
content: "";
display: block;
height: 15px;
margin-top: -7px;
position: absolute;
left: 11px;
top: 50%;
width: 15px;
}
a span:hover {
-moz-box-shadow: 0 1px 4px 0 #999999;
-webkit-box-shadow: 0 1px 4px 0 #999999;
-o-box-shadow: 0 1px 4px 0 #999999;
box-shadow: 0 1px 4px 0 #999999;
}
<a href="#">
<span>Home</span>
</a>
{"view":"split-vertical","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment