It is scrolled down as it originally works, I mean, like there's no scroll-snap option. why?
html code below:
<body>
<noscript>~~</noscript>
<div id="background"></div>
<header>
<nav><a href="/"><img src="~~" alt="To Mainpage"></a></nav>
<nav>
<ul>
<li><a href="/">~~</a></li>
<li><a href="/">~~</a></li>
</ul>
</nav>
</header>
<main>
<div id="container">
<section id="first">
<h1>~~</h1>
<article>~~</article>
</section>
<section id="second"></section>
</div>
</main>
</body>
and CSS code below:
#container {
scroll-snap-type: y mandatory;
overflow-y: scroll;
}
#container > section {
height: 100vh;
scroll-snap-align: start;
}
Make sure to give your parent container a height value, as shown in the example below.