Last active
July 13, 2022 17:52
-
-
Save mohammadkarbalaee/8ecc1e373dc807f85e56e090da694db9 to your computer and use it in GitHub Desktop.
background-clip: text example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>It's FRIDAY!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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