* { margin:0; padding:0; } .line { width:980px; height:100px; margin:100px auto; border-radius:10px; /* 线性渐变 */ background-image:linear-gradient( 135deg,yellow 25%,blue 25%,blue 50%,yellow 50%,yellow 75%,blue 75%,blue 100% ); background-size:100px 100px; animation:move 2s linear infinite; } @keyframes move { from { background-position:0px; } to { background-position:100px; } }
更新时间:2020-04-14 00:13:11