Update snippets
This commit is contained in:
@ -11,17 +11,18 @@ Gives text a gradient color.
|
||||
|
||||
```css
|
||||
.gradient-text {
|
||||
background: -webkit-linear-gradient(pink, red);
|
||||
background: linear-gradient(#70D6FF, #00072D);
|
||||
-webkit-text-fill-color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
font-size: 32px;
|
||||
}
|
||||
```
|
||||
|
||||
#### Explanation
|
||||
|
||||
1. `background: -webkit-linear-gradient(...)` gives the text element a gradient background.
|
||||
2. `webkit-text-fill-color: transparent` fills the text with a transparent color.
|
||||
3. `webkit-background-clip: text` clips the background with the text, filling the text with the gradient background as the color.
|
||||
- `background: -webkit-linear-gradient(...)` gives the text element a gradient background.
|
||||
- `webkit-text-fill-color: transparent` fills the text with a transparent color.
|
||||
- `webkit-background-clip: text` clips the background with the text, filling the text with the gradient background as the color.
|
||||
|
||||
#### Browser support
|
||||
|
||||
|
||||
Reference in New Issue
Block a user