在 CSS 中,渐变(Gradient)可谓是最为强大的一个属性之一。 但是,经常有同学在使用渐变的过程中会遇到渐变图形产生的锯齿问题。 何为渐变锯齿? 那么,什么是渐变图形产生的锯齿呢? 简单的一个
顺晟科技
2021-07-31 07:31:37
192
效果图
CSS 代码:
*{ margin: 0; padding: 0; } body{ height: 100vh; width: ; overflow: hidden; background-image: linear-gradient(125deg,#F44336,#E91E63,#9C27B0,#3F51B5,#2196F3); background-size: 400%; font-family: "montserrat"; animation: bganimation 15s infinite; } .text{ color: #fff; font-size: 22px; text-align: center; margin: 350px 0; /* text-transform: uppercase; */ } @keyframes bganimation{ 0%{ background-position: 0% 50%; } 50%{ background-position: 50%; } { background-position: 0% 50%; } }
推荐教程:《CSS教程》
以上就是CSS 实现背景动态渐变效果的详细内容,更多请关注炫H5其它相关文章!
09
2022-11
31
2022-10
31
2022-10
19
2022-10
07
2022-10
15
2022-09