通过背景定位来实现 background-position
在线demo: https://demo.crazyming.com/?link=css3/gradientBg.html
<style>
* {
margin: 0;
padding: 0;
}
body {
margin: 0;
width: 100%;
height: 100vh;
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
background-size: 400% 400%;
animation: gradientBG 15s ease infinite;
}
@keyframes gradientBG {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
1.如需转载本站原创文章,请务必注明文章出处并附上链接,非常感谢。
2.本站用于记录个人 工作、学习、生活,非商业网站,更多信息请 点击这里
上一篇: jquery ajax 文件上传配置
下一篇: 修改Angular路由模式为hash模式