跳到主要内容

渐变流动

背景渐变位置缓慢移动,形成流动感。

效果预览
参数调节
完整代码
/* 渐变流动 */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.gradient-shift { background-size: 200% 200%; animation: gradientShift 4s ease infinite; }