Created
December 5, 2011 20:31
-
-
Save mgauthier/1435223 to your computer and use it in GitHub Desktop.
Button with Gradient CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-container { | |
width:100%; | |
} | |
.button-container.right { | |
text-align:right; | |
} | |
a.button { | |
display:block; | |
} | |
.button, | |
.button:link, | |
input[type="submit"].button, | |
a.button { | |
text-decoration:none; | |
float:none; | |
position:relative; | |
cursor:pointer; | |
color: #fff; | |
font-size: 11px; | |
font-weight: normal; | |
text-align: center; | |
width: 100px; | |
text-transform: uppercase; | |
padding: 8px 5px; | |
margin: 2px; | |
border:0; | |
-moz-border-radius: 4px; | |
-webkit-border-radius: 4px; | |
border-radius:4px; | |
} | |
.button.black, | |
.button.black:link, | |
input[type="submit"].black { | |
background-image: linear-gradient(bottom, rgb(0,0,0) 5%, rgb(82,79,81) 88%); | |
background-image: -o-linear-gradient(bottom, rgb(0,0,0) 5%, rgb(82,79,81) 88%); | |
background-image: -moz-linear-gradient(bottom, rgb(0,0,0) 5%, rgb(82,79,81) 88%); | |
background-image: -webkit-linear-gradient(bottom, rgb(0,0,0) 5%, rgb(82,79,81) 88%); | |
background-image: -ms-linear-gradient(bottom, rgb(0,0,0) 5%, rgb(82,79,81) 88%); | |
background-image: -webkit-gradient( | |
linear, | |
left bottom, | |
left top, | |
color-stop(0.05, rgb(0,0,0)), | |
color-stop(0.88, rgb(82,79,81)) | |
); | |
background-color:#000; | |
} | |
.button.black:active { | |
background: #000; | |
} | |
.button:hover, | |
.button:active { | |
color:#fff; | |
} | |
.button.purple, | |
.button.purple:link, | |
input[type="submit"].purple { | |
background-image: linear-gradient(bottom, #B91C87 1%, #E048B0 51%); | |
background-image: -o-linear-gradient(bottom, #B91C87 1%, #E048B0 51%); | |
background-image: -moz-linear-gradient(bottom, #B91C87 1%, #E048B0 51%); | |
background-image: -webkit-linear-gradient(bottom, #B91C87 1%, #E048B0 51%); | |
background-image: -ms-linear-gradient(bottom, #B91C87 1%, #E048B0 51%); | |
background-image: -webkit-gradient( | |
linear, | |
left bottom, | |
left top, | |
color-stop(0.01, #B91C87), | |
color-stop(0.51, #E048B0) | |
); | |
background-color: #B91C88; | |
} | |
.button.purple:active { | |
background: #B91C88; | |
} | |
.button.logout { | |
float:right; | |
} | |
.button.small, | |
input[type="submit"].button.small { | |
width:75px; | |
padding:4px 2px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment