Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS 3 Buttons
/* IE 9 Mask */
.button_mask {overflow:hidden}
.button_mask, a.button {
display:inline-block;
border-radius:10px;
}
/* General Button Styles */
a.button {
display:inline-block;
zoom:1; /* IE 7 */
*display:inline; /* IE 7 */
color:#fff;
min-width:60px;
padding:10px 10px;
text-decoration:none;
font-size:14px;
line-height:14px;
background:#53c5c8;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#53c5c8', EndColorStr='#069ba1')"; /* IE8+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#53c5c8', EndColorStr='#069ba1');
background:-webkit-linear-gradient(#53c5c8, #30b2b6, #069ba1);
background:-moz-linear-gradient(#53c5c8, #30b2b6, #069ba1);
background:-o-linear-gradient(#53c5c8, #30b2b6, #069ba1);
background:linear-gradient(#53c5c8, #30b2b6, #069ba1);
border:1px solid #3eb2b6;
cursor:pointer;
}
a.button:hover {
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#5ddadd', EndColorStr='#068187')"; /* IE9 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5ddadd', EndColorStr='#068187');
background:#5ddadd;
background:-webkit-linear-gradient(#5ddadd, #068187);
background:-moz-linear-gradient(#5ddadd, #068187);
background:-o-linear-gradient(#5ddadd, #068187);
background:linear-gradient(#5ddadd, #068187);
border:1px solid #44c1c4;
}
a.button:active {
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#3cb8bd', EndColorStr='#059aa1')"; /* IE8+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#3cb8bd', EndColorStr='#059aa1');
background:#3cb8bd;
background:-webkit-linear-gradient(#3cb8bd, #23abaf, #059aa1);
background:-moz-linear-gradient(#3cb8bd, #23abaf, #059aa1);
background:-o-linear-gradient(#3cb8bd, #23abaf, #059aa1);
background:linear-gradient(#3cb8bd, #23abaf, #059aa1);
border:1px solid #089ca2;
}
<div class="button_mask"><a class="button" href="#">Learn More</a></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment