const slider =document.querySelector('.items');
let isDown = false
let startX;
let scrollLeft;
slider.addEventListener('mousedown',()=>{
isDown=true
silder.classList.add('active')
startX = e.pageX - slider.offsetLeft;
scrollLeft = slider.scrollLeft
})
slider.addEventListener('mouseleave',()=>{
isDown=false
silder.classList.remove('active')
})
slider.addEventListener('mouseup',()=>{
isDown=false
silder.classList.remove('active')
})
slider.addEventListener('mousemove',(e)=>{
if(!isDown)return
e.prvevntDefault();
const x =e.pageX-slider.offsetLeft
const walk = (x - startX) *3;
slider.scrollLeft = scrollLeft - walk
})