webdesign/CSS

-webkit-overflow-scrolling: touch;

yunsoo.note 2019. 4. 26. 18:14

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling

모바일 스크롤링 부드럽게 하기

-webkit-overflow-scrolling: touch; /* Lets it scroll lazy */

-webkit-overflow-scrolling: auto; /* Stops scrolling immediately */

 

auto

Use "regular" scrolling, where the content immediately ceases to scroll when you remove your finger from the touchscreen.

 

touch

Use momentum-based scrolling, where the content continues to scroll for a while after finishing the scroll gesture and removing your finger from the touchscreen. The speed and duration of the continued scrolling is proportional to how vigorous the scroll gesture was. Also creates a new stacking context.