Forked from anonymous/Colorful Gradient Buttons.markdown
Created
May 12, 2016 06:49
-
-
Save CodeMyUI/3960bf74adb507fe7cd3cfe1132afd3e to your computer and use it in GitHub Desktop.
Colorful Gradient Buttons
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="container"> | |
<div class="title">Colorful Gradient Buttons</div> | |
<br> | |
<a class="button red" href>Sunset</a> | |
<a class="button blue" href>Deep Sea</a> | |
<a class="button green" href>Pasture</a> | |
</div> | |
<div class="subtitle">Made with love by NathanAB</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(https://fonts.googleapis.com/css?family=Open+Sans:400,700); | |
@mixin gradient($from, $to) { | |
background: -moz-linear-gradient(45deg, $from, $to); | |
background: -webkit-linear-gradient(45deg, $from, $to); | |
background: linear-gradient(45deg, $from, $to); | |
} | |
html { | |
background-color: #EAEAEA; | |
font-family: 'Open Sans', sans-serif; | |
text-align: center; | |
padding: 50px; | |
} | |
.container { | |
padding: 50px; | |
background-color: #F0F0F0; | |
display: inline-block; | |
border-radius: 5px; | |
box-shadow: 0 0 30px #CACACA; | |
} | |
.title { | |
font-size: 36px; | |
color: #333; | |
} | |
.subtitle { | |
font-size: 12px; | |
color: #333; | |
position: fixed; | |
bottom: 20px; | |
left: 0; | |
right: 0; | |
margin: auto; | |
} | |
a.button { | |
display: inline-block; | |
font-size: 24px; | |
border-radius: 3px; | |
color: white; | |
text-decoration: none; | |
box-shadow: 0px 2px 10px #999; | |
cursor: pointer; | |
transition: all 0.3s ease; | |
margin: 20px; | |
padding: 15px 25px; | |
&.red { | |
@include gradient(#DBA551, #85202c); | |
} | |
&.blue { | |
@include gradient(#7399ae, #662452); | |
} | |
&.green { | |
@include gradient(#B7CF4F, #298520); | |
} | |
background-size: 250% 100% !important; | |
background-position: 100% 0% !important; | |
&:hover { | |
background-position: 0% !important; | |
box-shadow: 0 0px 12px #BBB; | |
transition: all 0.3s ease; | |
transform: translateY(-1px); | |
} | |
&:active { | |
transform: translateY(0); | |
background-position: 50% !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment