效果展示:
源码展示:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>纯CSS3实现文字的渐变动画</title>
<style>
.dv {
width:1000px;
height:300px;
margin:0 auto;
margin-top:100px;
font-size:80px;
text-align:center;
background:-webkit-linear-gradient(left,#147B96,#E6D205 25%,#147B96 50%,#E6D205 75%,#147B96);
color:transparent;
-webkit-background-clip:text;
background-size:200% 100%;
animation:masked-animation 1s infinite linear;
}
@-webkit-keyframes masked-animation {
0% {
background-position:0 0;
}
100% {
background-position:-100% 0;
}
}</style>
</head>
<body>
<div class="dv">嗨!我是C3文字渐变的效果</div>
</body>
</html>
更多相关技术内容咨询欢迎前往并持续关注六星社区了解详情。
程序员编程交流QQ群:805358732
如果你想用Python开辟副业赚钱,但不熟悉爬虫与反爬虫技术,没有接单途径,也缺乏兼职经验
关注下方微信公众号:Python编程学习圈,获取价值999元全套Python入门到进阶的学习资料以及教程,还有Python技术交流群一起交流学习哦。
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!