<a href="#" class="btn"> Click Click Click! </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!
.btn {
display: inline-block;
border: 2px solid;
position: relative;
background: #fff;
color: #614f38;
border: 1px solid #614f38;
padding: 1.2rem 2.5rem 1.2rem 2.5rem;
transition: all .3s;
&:before,
&:after {
content: "";
position: absolute;
display: block;
transition: all .3s;
}
&:before {
opacity: 0;
width: 7px;
height: 7px;
top: 50%;
right: 1.4rem;
border-top: solid 2px #614f38;
border-right: solid 2px #614f38;
transform: translateY(-50%) rotate(45deg);
}
&:after {
opacity: 0;
right: -2px;
bottom: -2px;
background: #614f38;
z-index: -1;
width: 0;
height: 0;
}
&:hover {
padding: 1.2rem 3.5rem 1.2rem 1.5rem;
&:before {
opacity: 1;
border-color: #614f38;
}
&:after {
opacity: 1;
width: calc(100% + 2px);
height: calc(100% + 2px);
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.