помогите устранить ошибку, parralax


  <header id="parallax" class="preview">
        
    </header>

.preview{
    width: 100%;
    height: 500px;
    background: url('https://1920x1080hdwallpapers.com/image/201502/nature/249/desert-cloud-road.jpg') center bottom \no-repeat;;
background-size: cover;
}

const parallax = document.getElementById('parallax');

window.addEventListener("scroll", function(){
    let offset = window.pageYOffset;
    // console.log('offset: ' +  offset);
    // console.log('offset * 0.7' + offset + 0.7 );
    parallax.style.backgroundPositionY = offset * 0.7 + 'px';
});

вывод ошибку кода в .style.backgroundPositionY, не могу понять почему (((


Ответы (0 шт):