в данном решении вижу идёт подмена фона на чёрный, и шрифт белый.Так это просто для примера, чтобы понятно было, что одним классом можно все менять. За это отвечают последние 2 блока css:
body.scroll-active {
color: #fff;
background-color: #2f2f2f;
}
.scroll-active .bnr {
opacity: 1;
}@media (max-width:1063px){
.content{display:none;}
.bnr_side_right{display:none;}
.bnr_side_left{display:none;}
}
let body = document.querySelector("body");
window.addEventListener("scroll", (e) => {
// If the height is more than 600px,
// Add the nav-scroll class to the header class
if (document.scrollingElement.scrollTop > 600) {
body.classList.add("scroll-active");
}
// Otherwise, we delete the scroll-active class
else {
body.classList.remove("scroll-active");
}
});
.scroll-active .someClass{
// code...
}
.scroll-active .other{
// code...
}
.scroll-active .other span div #other {
// code...
}
.scroll-active .other span div #other {
// code...
}