JSFiddle - React, Tailwind, and code Playground

by alvarotrigo

HTML

<div class="demo active"></div>

CSS

.demo{
        position: absolute;
        height: 256px;
        width: 256px;
        display: block;
        z-index: 999;
        display: block;
        will-change: background-position-x;
        bottom: 20px;
        overflow: hidden;
    }
    .demo:after{
        content: '';
        display: inline-block;
        position: absolute;
         height: 256px;
        width: 1536px;
        left: 0;
        top: 0;
        background-position: 0 0;
        transition: all 10000ms ease;
        background-image: url('https://cdn-images-1.medium.com/max/2600/1*WhDjw8GiV5o0flBXM4LXEw.png');

    }
    .demo.active:after {
        animation: pepe 300ms steps(5) infinite;

    }

    @keyframes pepe {
       from{ transform: translateX(0); }
       to{ transform: translateX(-1280px); }
    }