<a href="#" class="btn">Click Click Click! <i class="arrow"></i></a>
// reset & normalize
* {
text-decoration: none;
}
html {
font-size: 62.5%; // 62.5% = 1rem = 10px
padding: 3rem;
color: #614f38;
}
body {
font-size: 1.6rem;
}
// Start!
a.btn {
position: relative;
display: inline-block;
padding: 1.5rem 3.5rem 1.5rem 1.5rem;
border: 2px solid;
transition: all .3s;
color: #614f38;
z-index: 1;
overflow: hidden;
&:before {
content: "";
position: absolute;
z-index: -1;
right: -25px;
bottom: -25px;
width: 50px;
height: 50px;
background-image: linear-gradient(120deg, #ffde85 10%, #f3ae5c 100%);
transform: rotate(-45deg);
transition: all .3s;
}
.arrow {
color: #000;
position: absolute;
bottom:10px;
right:6px;
margin-left: 2px;
margin-top: 10px;
width: 15px;
height: 1px;
background-color: #fff;
transition: all .3s;
&:before {
content: '';
position: absolute;
right: 1px;
top: -4px;
width: 7px;
height: 7px;
border-top: solid 2px #fff;
border-right: solid 2px #fff;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
}
&:hover {
background-image: linear-gradient(120deg, #ffde85 10%, #f3ae5c 100%);
border-color:#fff;
padding: 1.5rem 2.5rem 1.5rem 2.5rem;
&:before {
right:-80px;
}
.arrow{
right:-20px;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.