JavaScript origin animation Posted on 2019-09-28 Edited on 2019-10-16 In JavaScript JavaScript Origin animationlist animation12345Array.from(lists).map((item, key)=>{ setTimeout(()=>{ item.style.transform = `translate(${}, ${})`; }, key * 100)}) shuffle animation123456let origin_arr = [];let shuffle_arr = _shuffle(origin_arr);shuffle_arr.map((item, key)=>{ item.style.transform = `translate(${origin_arr[key].offsetLeft}, ${origin_arr[key].offsetLeft})`;}) gressive animation1234567891011window.requestAnimationFrame( animation_1 )animation_1 = () => { let item = document.getElementById(‘id’); if(item.offsetLeft > some value){ item.style.left = some value return } speed = parseFloat((target - current)/10); item.style.left += speed;}