Created
June 5, 2011 00:25
-
-
Save mebens/1008528 to your computer and use it in GitHub Desktop.
The CSS and Sass code for my blog on making a 3D CSS button.
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
// These are some nice reusable mixins I keep around | |
@mixin transition($type, $time, $ease) { | |
-webkit-transition: $type $time $ease; | |
transition: $type $time $ease; | |
} | |
@mixin border-radius($length) { | |
border-radius: $length; | |
-webkit-border-radius: $length; | |
-moz-border-radius: $length; | |
} | |
.big-button { | |
color: #000300; | |
background-color: #00910A; | |
padding: 10px; | |
position: relative; | |
text-align: center; | |
font-size: 24px; | |
font-weight: bold; | |
@include transition(background-color, 0.2s, linear); | |
@include border-radius(10px); | |
box-shadow: | |
1px 1px 0 0 #014D06, | |
2px 2px 0 0 #014D06, | |
3px 3px 0 0 #014D06, | |
4px 4px 0 0 #014D06, | |
5px 5px 5px 0 #000000; | |
-webkit-box-shadow: | |
1px 1px 0 0 #014D06, | |
2px 2px 0 0 #014D06, | |
3px 3px 0 0 #014D06, | |
4px 4px 0 0 #014D06, | |
5px 5px 5px 0 #000000; | |
-moz-box-shadow: | |
1px 1px 0 0 #014D06, | |
2px 2px 0 0 #014D06, | |
3px 3px 0 0 #014D06, | |
4px 4px 0 0 #014D06, | |
5px 5px 5px 0 #000000; | |
&:hover { background-color: #00B00C; } | |
&:active { | |
box-shadow: 1px 1px 5px 0 #000000; | |
-webkit-box-shadow: 1px 1px 5px 0 #000000; | |
-moz-box-shadow: 1px 1px 5px 0 #000000; | |
top: 4px; | |
left: 4px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment