感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<div class="gradient1">
<span>渐变1 - 菜鸟工具</span>
</div>
<h2 class="text-gradient" data-text="渐变2 - 菜鸟工具">渐变2 - 菜鸟工具</h2>
输入 JavaScript 代码……
xxxxxxxxxx
.gradient1 span {
background: linear-gradient(to right, red, blue);
-webkit-background-clip: text;
color: transparent;
}
.text-gradient {
display: inline-block;
font-family: '微软雅黑';
font-size: 2em;
position: relative;
.text-gradient[data-text]::after {
content: attr(data-text);
color: green;
position: absolute;
left: 0;
z-index: 2;
-webkit-mask-image: -webkit-gradient(linear, 0 0, 0 bottom, from(#ff0000), to(rgba(0, 0, 255, 0)));