用處
可用于網(wǎng)站的logo
基本思路
通過把文字設(shè)置為透明, 使用漸變背景, 利用剪裁背景為文字來實(shí)現(xiàn)效果
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;