I'm trying to implement vertical snap-into-place scrolling using CSS for a site, but having trouble getting it to work. To isolate the problem, I created this toy example:
#container {
scroll-snap-type: y mandatory;
}
.tile {
height: 100vh;
width: 100vw;
scroll-snap-align: start;
}
<div id="container">
<div class="tile" style="background-color:red;">
</div>
<div class="tile" style="background-color:blue;">
</div>
<div class="tile" style="background-color:green;">
</div>
<div class="tile" style="background-color:yellow;">
</div>
</div>
However everything still scrolls freely. Where am I going wrong? Thanks!