Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mohammadkarbalaee/8ecc1e373dc807f85e56e090da694db9 to your computer and use it in GitHub Desktop.
Save mohammadkarbalaee/8ecc1e373dc807f85e56e090da694db9 to your computer and use it in GitHub Desktop.
background-clip: text example
<h1>It's FRIDAY!</h1>
@import url('https://fonts.googleapis.com/css?family=Luckiest+Guy');
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: black;
font-family: 'Luckiest Guy', cursive;
}
@keyframes moveBg {
0% {
background-position: 0% 30%;
}
100% {
background-position: 100% 50%;
}
}
h1 {
font-size: 15vw;
background-image: url(https://i.ibb.co/89Cf3dm/text-bg.png);
background-size: cover;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: moveBg 90s linear infinite;
-webkit-animation: moveBg 90s linear infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment