<a class="Link" href="#">
<span class="Link-title">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Laudantium sequi est similique natus alias. Velit provident corrupti asperiores maxime saepe aliquam atque laboriosam. Id incidunt iusto ea, voluptates velit sed?</span>
</a>
html,
body {
height: 100%;
}
body {
align-items: center;
display: flex;
justify-content: center;
}
a, a:focus, a:hover, a:active, a:visited {
color: inherit;
text-decoration: none;
}
.Link {
filter: drop-shadow(0 1em 1em rgba(#000, .16));
font-size: 1rem;
max-width: 25em;
padding: 2em 2.4em;
position: relative;
transform: translateZ(0);
}
.Link::before,
.Link::after {
background-color: #fff;
border-radius: 3px;
content: ' ';
display: block;
position: absolute;
transform-origin: right;
transition: transform 500ms;
width: 100%; height: 100%;
top: 0; left: 0;
z-index: -1;
}
.Link::after {
background-color: #444;
transform: scaleX(0);
transition-duration: 450ms;
}
.Link-title {
background-image:
linear-gradient(0deg, #ddd, #000),
linear-gradient(0deg, #fff, #fff),
;
background-size: 0 2px, 0 100%;
background-position: 8px calc(1em + 8px), 0 0;
background-repeat: no-repeat;
box-decoration-break: clone;
display: inline;
font-size: 30px;
font-weight: 300;
padding: 6px 8px;
margin-left: -8px;
pointer-events: none;
line-height: 1.75;
text-shadow: 1px 1px 0 #fff, -1px 1px 0 #fff;
transition: background ease-out 500ms;
}
.Link:hover > .Link-title {
background-size: calc(100% - 16px) 2px, 100% 100%;
transition-duration: 200ms;
}
.Link:hover::before {
transform: scaleX(0);
transition-duration: 450ms;
transition-timing-function: ease-in-out;
}
.Link:hover::after {
transform: scaleX(1);
transition-duration: 700ms;
transition-timing-function: ease-in-out;
transform-origin: left;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.