* { margin: 0; padding: 0; } .box { width: 1000px; height: 100px; margin: 80px auto; transition: all .5s linear; animation: animate 0.5s linear infinite; background-size: 100px 100px; background-image: linear-gradient( 135deg, #fff, #fff 25%, black 25%, black 50%, #fff 50%, #fff 75%, black 75%, black 100% ); } /*.box:hover { background-position:-100px 0; } */ @keyframes animate { 0 { } 100% { background-position:100px 0; } }