div.content
a.button.
Hover Me :D
View Compiled
:root {
--white: #ffffff;
--purple: #3d0776;
}
.content {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--purple);
}
.button {
font-size: 2rem;
font-family: 'Montserrat', sans-serif;
padding: 1rem;
position: relative;
cursor: pointer;
color: var(--white);
&:after{
content: '';
background: #fff;
position: absolute;
bottom: 0;
width: 0;
left: 50%;
height: 3px;
transform: translateX(-50%);
transition: all cubic-bezier(0, 0.96, 0.58, 1.1) 1s;
}
&:hover {
&:after {
width: 50%;
transition: all cubic-bezier(0, 0.96, 0.58, 1.1) 1s;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.