How to force a scroll bar to appear in the ipad? (Mobile Safari) [duplicate]

大憨熊 提交于 2019-12-07 06:47:53

问题


I am having trouble getting a scroll bar to appear in mobile safari because overflow: auto does not work when there is scroll-able content. I found this css property:

-webkit-overflow-scrolling: touch

as some suggested this is a fix for mobile safari hiding the scroll bars but it's not working for me. Anyone have any suggestions on how I can force there to be a scroll bar in mobile safari to give the user a visual that they are supposed to scroll?


回答1:


In your CSS include:

::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0,0,0,.5);
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

Customize the appearance as needed.

Stackoverflow source

Original source



来源:https://stackoverflow.com/questions/14842876/how-to-force-a-scroll-bar-to-appear-in-the-ipad-mobile-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!