<main>
<a class="btn">
MKIMQ
</a>
</main>
* {
padding: 0;
margin: 0;
}
body {
background: #34495e;
}
main {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
main .btn {
display: block;
height: 30px;
width: 150px;
border: solid 2px #e74c3c;
background: none;
color: white;
position: relative;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
cursor: pointer;
box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}
main .btn::before {
transition: all .8s;
align-self: center;
content: '';
position: absolute;
width: 0;
height: 100%;
background: #e74c3c;
z-index: -1;
transform: skewX(-45deg);
}
main .btn:hover::before {
width: 200%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.