parallax1 시간차 parallax 패럴렉스 표현 let bg = document.getElementById('bg');let text = document.getElementById('text');let image = document.getElementById('image');window.addEventListener('scroll', function(){ var value = window.scrollY; bg.style.top = value * 0.25 + 'px'; text.style.top = value * 0.15 + 'px';}) 2024. 4. 28. 이전 1 다음