Skip to content

Instantly share code, notes, and snippets.

@rblalock
Created October 26, 2010 04:42
Show Gist options
  • Save rblalock/646330 to your computer and use it in GitHub Desktop.
Save rblalock/646330 to your computer and use it in GitHub Desktop.
Native OS looking CSS3 button
.nativebutton {
display: inline-block;
margin: 20px;
padding: 3px 6px;
font-family: 'Lucida Grande', Arial, sans-serif;
font-size: 13px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 0.6);
background: -webkit-gradient(linear, left top, left bottom, from(#fbfcfb), to(#9d9e9d));
background: -moz-linear-gradient(#fbfcfb, #9d9e9d);
background-color: #c0c2c0;
text-shadow: rgba(255, 255, 255, 0.4) 0px 1px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 1px;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 1px;
box-shadow: rgba(255, 255, 255, 0.4) 0 1px;
-webkit-user-select: none;
-moz-user-select: none;
cursor: default;
}
.nativebutton:active {
background: #B5B5B5;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 1px,
black 0px 1px 3px inset,
rgba(0, 0, 0, 0.4) 0px -5px 12px inset;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 1px,
black 0px 1px 3px inset,
rgba(0, 0, 0, 0.4) 0px -5px 12px inset;
box-shadow: rgba(255, 255, 255, 0.4) 0 1px,
black 0px 1px 3px inset,
rgba(0, 0, 0, 0.4) 0px -5px 12px inset;
text-shadow: rgba(255, 255, 255, 0.3) 0px 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment