Skip to content

Instantly share code, notes, and snippets.

@IrvBriscoe
Created March 19, 2012 06:15
Show Gist options
  • Save IrvBriscoe/2098469 to your computer and use it in GitHub Desktop.
Save IrvBriscoe/2098469 to your computer and use it in GitHub Desktop.
Cta css3 buttons
/*Eric Meyer’s “Reset CSS” 2.0 CSS Reset*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
#container{ margin: 20px; }
/*Default button styles*/
.button{
background: #d2d2d0;
border: 1px solid #727272;
color: #fff;
display: inline-block;
font-family: arial, helvetica, sans-serif;
font-weight: bold;
font-size: 13px;
margin: 0 10px 10px 0;
padding: 7px;
text-decoration: none;
text-shadow: 0px -1px 0px #969696;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: -moz-linear-gradient(top, #d2d2d0 0%, #c3c3c2 5%, #b0b1b0 51%, #a7a7a7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d2d2d0), color-stop(5%,#c3c3c2), color-stop(51%,#b0b1b0), color-stop(100%,#a7a7a7));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d2d0', endColorstr='#a7a7a7',GradientType=0 ); /* ie */
}
.button:hover{
background: #dfdfde;
background: -moz-linear-gradient(top, #dfdfde 0%, #c9cac8 5%, #c9c9c8 51%, #b6b6b5 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dfdfde), color-stop(5%,#c9cac8), color-stop(51%,#c9c9c8), color-stop(100%,#b6b6b5));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfdfde', endColorstr='#b6b6b5',GradientType=0 ); /* ie */
}
/*Green Button*/
.green{
border: 1px solid #467700;
text-shadow: 0px -1px 0px #55980d;
background: #B3D72D;
background: -moz-linear-gradient(top, #B3D72D 0%, #93C623 5%, #7CBA1D 51%, #6AB119 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#B3D72D), color-stop(5%,#93C623), color-stop(51%,#7CBA1D), color-stop(100%,#6AB119));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#B3D72D', endColorstr='#6AB119',GradientType=0 ); /* ie */
}
.green:hover{
background: #B8E02F;
background: -moz-linear-gradient(top, #B8E02F 0%, #9BD325 5%, #85C920 51%, #76C21C 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#B8E02F), color-stop(5%,#9BD325), color-stop(51%,#85C920), color-stop(100%,#76C21C));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#B8E02F', endColorstr='#76C21C',GradientType=0 ); /* ie */
}
/*Blue Buttons*/
.blue{
border: 1px solid #325a74;
text-shadow: 0px -1px 0px #325a74;
background: #5ca8da;
background: -moz-linear-gradient(top, #5ca8da 0%, #5092bd 5%, #3b7ba5 51%, #2c6a92 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5ca8da), color-stop(5%,#5092bd), color-stop(51%,#3b7ba5), color-stop(100%,#2c6a92));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5ca8da', endColorstr='#2c6a92',GradientType=0 ); /* ie */
}
.blue:hover{
background: #64b4e9;
background: -moz-linear-gradient(top, #64b4e9 0%, #579dcb 5%, #4288b6 51%, #3277a4 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#64b4e9), color-stop(5%,#579dcb), color-stop(51%,#4288b6), color-stop(100%,#3277a4));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64b4e9', endColorstr='#3277a4',GradientType=0 ); /* ie */
}
<div id="container">
<a class="button" href="#">Learn more about me</a>
<a class="button blue" href="#">View my portfolio</a>
<a class="button green" href="#">Party with me</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment