Created
November 2, 2012 23:23
-
-
Save Ricardo-Diaz/4004991 to your computer and use it in GitHub Desktop.
CSS: 3D Button Effect
This file contains hidden or 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
//3D Button Effect | |
$bottomSide: #3852b1; | |
$rightSide: #203891; | |
.button, #rcp_submit { | |
border: 0; // kill default styling | |
background: #4e68c7; | |
box-shadow: | |
// right side // bottom | |
1px 0px 1px $rightSide, 0px 1px 1px $bottomSide, | |
2px 1px 1px $rightSide, 1px 2px 1px $bottomSide, | |
3px 2px 1px $rightSide, 2px 3px 1px $bottomSide, | |
4px 3px 1px $rightSide, 3px 4px 1px $bottomSide, | |
5px 4px 1px $rightSide, 4px 5px 1px $bottomSide, | |
6px 5px 1px $rightSide; | |
color: white; | |
padding: 7px 16px; | |
position: relative; | |
top: -5px; | |
&:hover, &:focus { | |
background: ; | |
} | |
&:active{ | |
box-shadow: | |
// right side // bottom | |
1px 0px 1px $rightSide, 0px 1px 1px $bottomSide, | |
2px 1px 1px $rightSide, 1px 2px 1px $bottomSide, | |
3px 2px 1px $rightSide, 2px 3px 1px $bottomSide; | |
top: -2px; | |
left: 3px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment