Skip to content

Instantly share code, notes, and snippets.

@marcwieland95
Created January 12, 2021 15:39
Show Gist options
  • Save marcwieland95/d0b599551828d0816981b8d160bd95d8 to your computer and use it in GitHub Desktop.
Save marcwieland95/d0b599551828d0816981b8d160bd95d8 to your computer and use it in GitHub Desktop.
a {
position: relative;
display: inline-block;
font-size: 2em;
font-weight: 800;
color: royalblue;
overflow: hidden;
background: linear-gradient(to right, midnightblue, midnightblue 50%, royalblue 50%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 200% 100%;
background-position: 100%;
transition: background-position 275ms ease;
text-decoration: none; // text decorations are clipped in WebKit browsers
&:hover {
background-position: 0 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment