Skip to content

Instantly share code, notes, and snippets.

@edwardloveall
Created November 30, 2011 03:24
Show Gist options
  • Save edwardloveall/1407853 to your computer and use it in GitHub Desktop.
Save edwardloveall/1407853 to your computer and use it in GitHub Desktop.
Mac Style Button
button {
display: inline-block;
padding: .2em 1.1em;
color: #000 !important;
text-align: center;
background-image: #eeeeee;
background-image: -moz-linear-gradient(top, #eeeeee 50%, #d4d4d4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eeeeee), color-stop(100%, #d4d4d4));
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #d4d4d4 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #d4d4d4 100%);
background-image: -ms-linear-gradient(top, #eeeeee 50%, #d4d4d4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$top', endColorstr='$bottom',GradientType=0 );
background: linear-gradient(top, #eeeeee 50%, #d4d4d4 100%);
border: 1px solid #888;
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
}
button:active {
background-image: #dddddd;
background-image: -moz-linear-gradient(top, #dddddd 50%, #f7f7f7 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(50%, #dddddd), color-stop(100%, #f7f7f7));
background-image: -webkit-linear-gradient(top, #dddddd 50%, #f7f7f7 100%);
background-image: -o-linear-gradient(top, #dddddd 50%, #f7f7f7 100%);
background-image: -ms-linear-gradient(top, #dddddd 50%, #f7f7f7 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$top', endColorstr='$bottom',GradientType=0 );
background: linear-gradient(top, #dddddd 50%, #f7f7f7 100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment