Created
April 12, 2023 02:29
-
-
Save sandhikagalih/c1463f933431cefc32192383bdbe2741 to your computer and use it in GitHub Desktop.
Code untuk video CSS Gradient
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>CSS Gradient</title> | |
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
| <link href="https://fonts.googleapis.com/css2?family=Lilita+One&display=swap" rel="stylesheet" /> | |
| <style> | |
| :root { | |
| /* --gradient: linear-gradient(90deg, #ee6352, purple, #ee6352); */ | |
| /* --gradient: linear-gradient(102.4deg, rgba(253, 189, 85, 1) 7.8%, rgba(249, 131, 255, 1) 100.3%); */ | |
| /* --gradient: linear-gradient(102.4deg, rgba(249, 131, 255, 1) 100.3%, rgba(253, 189, 85, 1) 7.8%); */ | |
| /* --gradient: linear-gradient(90deg, hsla(59, 86%, 68%, 1) 0%, hsla(134, 36%, 53%, 1) 100%); */ | |
| --gradient: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%); | |
| } | |
| body { | |
| font-family: basic-sans, sans-serif; | |
| min-height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| font-size: 1.125em; | |
| line-height: 1.6; | |
| color: #333; | |
| background: #ddd; | |
| background-size: 300%; | |
| background-image: var(--gradient); | |
| background-position: left; | |
| animation: bg-animation 5s infinite alternate; | |
| } | |
| @keyframes bg-animation { | |
| 0% { | |
| background-position: left; | |
| } | |
| 100% { | |
| background-position: right; | |
| } | |
| } | |
| h1 { | |
| font-family: 'Lilita One', cursive; | |
| font-size: 8rem; | |
| text-align: center; | |
| text-transform: uppercase; | |
| background-image: var(--gradient); | |
| -webkit-background-clip: text; | |
| background-size: 200%; | |
| background-clip: text; | |
| color: transparent; | |
| /* text-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5); */ | |
| filter: drop-shadow(3px 3px 3px rgba(48, 71, 71, 0.8)); | |
| } | |
| h1:hover { | |
| cursor: pointer; | |
| animation: bg-animation 2s infinite alternate; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Sandhika Galih</h1> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment