<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. <a>Mollitia nostrum placeat consequatur deserunt velit ducimus possimus commodi temporibus debitis quam, </a>molestiae laboriosam sit repellendus sed sapiente quidem quod accusantium vero.</p>
html,
body {
width: 100%;
height: 100%;
display: flex;
overflow: hidden;
}
p {
margin: 50px auto;
width: 500px;
font-size: 24px;
line-height: 1.5;
color: #666;
cursor: pointer;
}
a {
background: linear-gradient(90deg, #fc0, #fc0);
// background: linear-gradient(90deg, #ff3c41, #fc0, #8500d8);
background-size: 0 100px;
// background-size: 100% 100%;
background-repeat: no-repeat;
background-position: 0 100%;
// background-position: 100% 100%;
cursor: pointer;
color: #666;
background-clip: text;
transition: .6s all linear;
// line-height: 3;
// opacity: 1;
}
// a::before {
// content: "";
// position: fixed;
// background: rgba(0, 0, 0, .8);
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// z-index: -1;
// transition: .3s all linear;
// opacity: 0;
// }
p:hover a {
background-size: 100% 100%;
// background-position: 0 100%, 0 100%;
// background-size: 0 100px;
color: transparent;
}
// p:hover a::before {
// opacity: 1;
// }
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.