<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;
transition: all .3s;
color: #614f38;
z-index: 1;
overflow: hidden;
background-image: linear-gradient(120deg, #ffde85 10%, #f3ae5c 100%);
&:before {
position: absolute;
content: "";
background: #614f38;
top: 50%;
transform: translateY(-50%);
}
&:before {
width: 30px;
right: 0;
height: 1px;
transition: .4s;
transition: all .3s;
}
&:hover {
color: #fff;
padding: 1.5rem 2.5rem 1.5rem 2.5rem;
&:before{
width:0;
background:#fff;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.