用处
可用于网站的logo
基本思路
通过把文字设置为透明, 使用渐变背景, 利用剪裁背景为文字来实现效果
h1 {
font-size: 72px;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
- 其中
-webkit-text-fill-color: transparent;
, 也可以改为color: transparent;
效果
Paste_Image.png