Simple Buttons with CSS3
Created
May 6, 2014 09:13
-
-
Save mithicher/11556831 to your computer and use it in GitHub Desktop.
A Pen by Mithicher.
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
<div class="wrap"> | |
<h1>Ghost Buttons with CSS3 <small>created by <a href="https://twitter.com/mithicher"> | |
@mithicher | |
</a></small></h1> | |
<h2>Buttons with Radius</h2> | |
<a class="btn btn-medium btn-blue btn-radius" href="#">Download</a> | |
<a class="btn btn-medium btn-green btn-radius" href="#">Sign Up</a> | |
<a class="btn btn-medium btn-orange btn-radius" href="#">Sign In</a> | |
<a class="btn btn-medium btn-red btn-radius" href="#">Read More</a> | |
<a class="btn btn-medium btn-gray btn-radius" href="#">Forgot Password</a> | |
<hr /> | |
<h2>Medium Buttons</h2> | |
<a class="btn btn-medium btn-blue" href="#">Download</a> | |
<a class="btn btn-medium btn-green" href="#">Sign Up</a> | |
<a class="btn btn-medium btn-orange" href="#">Sign In</a> | |
<a class="btn btn-medium btn-red" href="#">Read More</a> | |
<a class="btn btn-medium btn-gray" href="#">Forgot Password</a> | |
<hr /> | |
<h2>Small Buttons</h2> | |
<a class="btn btn-small btn-blue" href="#">Download</a> | |
<a class="btn btn-small btn-green" href="#">Sign Up</a> | |
<a class="btn btn-small btn-orange" href="#">Sign In</a> | |
<a class="btn btn-small btn-red" href="#">Read More</a> | |
<a class="btn btn-small btn-gray" href="#">Forgot Password</a> | |
<hr /> | |
<h2>Large Buttons</h2> | |
<a class="btn btn-large btn-blue" href="#">Download</a> | |
<a class="btn btn-large btn-green" href="#">Sign Up</a> | |
<a class="btn btn-large btn-orange" href="#">Sign In</a> | |
<a class="btn btn-large btn-red" href="#">Read More</a> | |
<a class="btn btn-large btn-gray" href="#">Forgot Password</a> | |
<hr /> | |
<p>Colors taken from <a href="http://colours.neilorangepeel.com">colours.neilorangepeel.com</a>.</p> | |
</div> |
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
@import url(http://fonts.googleapis.com/css?family=Raleway); | |
*, *:before, *:after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
.wrap { | |
max-width: 900px; | |
margin: 4em auto; | |
font-family: Raleway, Arial, sans-serif; | |
} | |
hr { | |
display: block; | |
height: 1px; | |
border: 0; | |
border-top: 2px solid #eee; | |
margin: 2em 0; | |
padding: 0; | |
} | |
h1, h2 { | |
margin-bottom: 1em; | |
border-bottom: 2px solid #eee; | |
line-height: 1.5; | |
} | |
h1 > small{ | |
color: #666; | |
} | |
h1 > small > a, | |
p > a{ | |
color: #3CB371; | |
text-decoration: none; | |
} | |
h1 > small > a:hover, | |
p > a:hover{ | |
text-decoration: underline; | |
} | |
/* Buttons styles */ | |
input::-moz-focus-inner, | |
button::-moz-focus-inner { | |
border: 0; | |
padding: 0; | |
} | |
input[type="submit"].btn, | |
button.btn { | |
cursor: pointer; | |
} | |
a.btn,.btn { | |
margin-right: 1em; /* remove this while use*/ | |
display: inline-block; | |
outline: none; | |
*zoom: 1; | |
text-align: center; | |
text-decoration: none; | |
font-family: inherit; | |
font-weight: 300; | |
letter-spacing: 1px; | |
vertical-align: middle; | |
border: 1px solid; | |
transition: all 0.2s ease; | |
box-sizing: border-box; | |
text-shadow: 0 1px 0 rgba(0,0,0,0.01); | |
} | |
/* Radius */ | |
.btn-radius { | |
border-radius: 3px; | |
} | |
/* Sizes */ | |
.btn-small { | |
font-size: 0.8125em; | |
padding: 0.4125em 1.25em; | |
} | |
.btn-medium { | |
font-size: 0.9375em; | |
padding: 0.5375em 1.375em; | |
} | |
.btn-large { | |
font-size: 1.0625em; | |
padding: 0.5625em 1.5em; | |
} | |
/* Colors */ | |
.btn-green { | |
color: #3CB371; | |
border-color: #3CB371; | |
} | |
.btn-green:hover { | |
background: #3CB371; | |
color: #fff; | |
border-color: #3CB371; | |
} | |
.btn-blue { | |
color: #4682B4; | |
border-color: #4682B4; | |
} | |
.btn-blue:hover { | |
background: #4682B4; | |
color: #fff; | |
border-color: #4682B4; | |
} | |
.btn-orange { | |
color: #FF8C00; | |
border-color: #FF8C00; | |
} | |
.btn-orange:hover { | |
background: #FF8C00; | |
color: #fff; | |
border-color: #FF8C00; | |
} | |
.btn-red { | |
color: #B22222; | |
border-color: #B22222; | |
} | |
.btn-red:hover { | |
background: #B22222; | |
color: #fff; | |
border-color: #B22222; | |
} | |
.btn-gray { | |
color: #808080; | |
border-color: #808080; | |
} | |
.btn-gray:hover { | |
background: #808080; | |
color: #fff; | |
border-color: #808080; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment