scroll-snap

Website double-scrolling on Chrome using scroll-snap-type

醉酒当歌 提交于 2020-12-31 06:03:22
问题 I want my sections to take the whole page and as soon as the user scrolls up or down, the previous/next section comes up. It works perfectly on Firefox and on Chromium-Edge, but when I tested it on Chrome, it always skips a section (goes from section1 to section 3 and from section 3 back to section 1). What can I do to solve this problem? Here is the HTML: <div class="page container"> <div class="section section1"> ... </div> <div class="section section1"> ... </div> <div class="section

Potensial CSS Scroll Snap bug in Chrome (Windows). Two examples, only one work. Why?

此生再无相见时 提交于 2020-01-30 01:12:02
问题 Here are two CSS scroll-snaps examples from csstricks.com Example #0 works on Chrome on Windows Example #3 does not work Why does one of them work, and not the other; what is the difference between the two? Example 1: .container { flex-basis: 50%; max-height: 100vh; overflow-y: scroll; border: 1px solid gray; scroll-snap-type: y mandatory; &.proximity { scroll-snap-type: y proximity; } } li { border-bottom: 1px solid white; padding: 3rem; font-size: 1.4rem; color: rgba(white, .5); background: