给博客添加炫酷流光文字CSS代码

彩色流光文字HTML代码,添加到要展示的位置,在添加css就行了。

<div class="text-style-1">
小马博客
</div>

css代码

@keyframes text-style-1 {
0% {
background-position: 0 0;
}
100% {
background-position: -100% 0;
}
}
.text-style-1 {
font-size: 30px;
background-image: linear-gradient(to right, red , yellow, green, yellow, red);
background-clip: text;
-webkit-background-clip: text;
background-size: 200% 100%;
color: transparent;
animation: text-style-1 2s infinite linear;
}

 

版权声明:
作者:小马
链接:https://www.xiaomaw.cn/370.html
来源:小马博客
文章版权归作者所有,未经允许请勿转载。
THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录