let start = Date.now(),
myTimer = setInterval(function() {
let timeSet = Date.now() - start;
if (timeSet >= 2000) {
clearInterval(myTimer);
return;
}
moving(timeSet);
function moving(timeSet) {
modalContent.style.top = timeSet / 35 + 'px';
}
}, 20);