是的,您可以使用text-fill-color和background-clip属性。
html, body {
background: #000;
}
p {
margin: 0px;
}
#clip {
background: linear-gradient(to right, rgba(127, 127, 127, 1) 23%, rgba(234, 85, 7, 1) 20%, rgba(234, 85, 7, 1) 57%, rgba(127, 127, 127, 1) 59%);
background-attachment: fixed;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
font-size: 8vw;
font-weight: bold;
text-align: center;
}Run Code Online (Sandbox Code Playgroud)
<p id="clip">Lorem ipsum dolor sit </p>Run Code Online (Sandbox Code Playgroud)
注意:访问此链接了解更多信息。
| 归档时间: |
|
| 查看次数: |
98 次 |
| 最近记录: |