Created
October 6, 2025 09:47
-
-
Save davidde/607d81d7dabe0ec8018b4c8221a7be4b to your computer and use it in GitHub Desktop.
CSS Text Gradients
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>CSS Text Gradients</title> | |
| <style> | |
| h1 { | |
| font-family: sans-serif; | |
| font-size: 6rem; | |
| max-width: max-content; | |
| margin-inline: auto; | |
| font-weight: 900; | |
| letter-spacing: -.1em; | |
| background: linear-gradient( | |
| to right in oklch shorter hue, | |
| oklch(71.402% 0.28369 331.861), | |
| oklch(73.691% 0.15828 235.877), | |
| oklch(73.238% 0.23846 141.125)); | |
| background-clip: text; | |
| color: transparent; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Hello World</h1> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment