Bootstrap responsive table not scrolling vertically on iOS devices

后端 未结 3 1829
闹比i
闹比i 2021-02-19 04:07

This is what I have:

....
&
3条回答
  •  既然无缘
    2021-02-19 04:59

    I had the same problem then I removed overflow: hidden; from html and body. The behavior of Safari on IOS matched the behavior of Chrome on Android, ie, the page was scrolling vertically again. Check and see if a parent of .table-responsive has overflow-hidden and try commenting it out.

    I'm still looking for a better solution that will not force me to alter the CSS of parent elements.

    [EDIT]

    Found it. You don't need to change the overflow value on the parent of .table-responsive, just make sure you add

    parent {
        overflow-y: scroll; /* has to be scroll, not auto */
        -webkit-overflow-scrolling: touch;
    }
    

提交回复
热议问题