I tried several different solutions, it did not seem to work perfectly in my case.
Finally, I found a way to work fine with jQuery:
Apply the -webkit-overflow-scroll property every time you touch.
* At first, I also used -webkit-overflow-scrolling: auto when TouchDown to disable iOS rendering. But that made the page blink. So I threw it away and then worked wonderfully surprisingly!
Check the lines below, hope this helps:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script type="text/javascript"> </script> <div id="TestDIV"> <div class="Element"></div> <div class="Element"></div> <div class="Element"></div> <div class="Element"></div> <div class="Element"></div> </div> <style> #TestDIV{ white-space: nowrap; overflow-x: scroll; -webkit-overflow-scrolling:touch; } #TestDIV .Element{ width:300px; height:300px; margin: 2px; background-color: gray; display: inline-block; } #TestDIV .Element:nth-child(odd){ background-color: whitesmoke; } </style>
Corxit Sun Nov 22 '17 at 9:19 on 2017-11-22 09:19
source share