I have an unordered list which is set to overflow: hidden. The width and height are fixed, and I want to be abble to scrol-drag the li‘s vertically on mobile devices.
Is that possible? Or do I have to create a div and use it as a mask?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instead of setting the
<ul>tooverflow:hidden. Why don’t you set it tooverflow:scroll?I have created a basic example with a bunch of list items in an unordered list that you can find here: http://fiddle.jshell.net/sbhomra/HMTpa/4/show/light/
I added a
-webkit-overflow-scrolling:touchstyle which I believe is part of the iOS5 webkit.I have tested this on an iPad and the scrolling works. But I haven’t tested it on other touch devices.
Edit
I actually found something called iScroll that could help you simulate scrolling across mobile devices: http://cubiq.org/iscroll