1.text-fill-color :<color>
设置对象中的文字填充颜色
2.案例:
background-clip属性:剪裁文本,对两个div元素分别使用不同的背景图片。
代码:
Markup
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>文字填充颜色</title>
<style>
.box1{
width: 950px;
height: 200px;
margin: 0 auto;
outline: 1px solid salmon;
font-size: 60px;
background-image: linear-gradient(to top,#eee, #aaa 50% ,#333 51%, #000);
-webkit-text-fill-color: transparent;
/* 把一张大白纸 拆件成文字的形状 剪纸 */
-webkit-background-clip: text;
}
/* 透过字去看背景图 */
</style>
</head>
<body>
<div class="box1">
送你一朵小红花
开在你昨天新长的枝桠
奖励你有勇气 主动来和我说话
</div>
</body>
</html>