/ Published in: CSS
Green button with color transitions for both text and the background on hover. The transition only works for webkit browsers currently. Users in IE will only see a boxy button, no rounded corners or transitions, but a button all the same.
Expand |
Embed | Plain Text
a.btn { background: #008752 url(images/alert-overlay.png) repeat-x; /*white gradient png*/ color: #fff; display: inline-block; text-decoration: none; padding: 5px 9px; /* Space around the button */ border-bottom: 1px solid rgba(0,0,0,0.25); /* adds a slightly darker line on bottom */ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; -webkit-transition: color .6s linear; -webkit-transition: background-color .6s linear; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); } a:hover.btn { background: #fff url(images/alert-overlay.png) repeat-x; color: #008752; text-decoration: none; padding: 5px 9px; border-bottom: 1px solid rgba(0,0,0,0.25); -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; -webkit-transition:color .2s linear; -webkit-transition:background-color .2s linear; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); text-shadow: 0 1px 1px rgba(0,0,0,0.25); }
You need to login to post a comment.
