我做的手机端滑动幻灯片,但是滑动的时候总是一卡一卡的,完全不流畅,不知道为什么
arrLi[i].addEventListener('touchmove',function(event){ event.preventDefault(); xMove = event.touches[0].clientX; direction = xMove - xDown; xTranslateMove = xTranslateEnd+direction; getUl.style.transform = 'translate('+xTranslateMove+'px,0)'; getUl.style.webkitTransitionDuration = "0ms"; //debounce(moveX); })
相关分类