ipad/iphone 滚动 div - 出现滚动条

发布于 2024-10-08 03:36:50 字数 115 浏览 6 评论 0原文

我有一个单页应用程序,其中滚动 DIV 作为 iPhone/iPad 应用程序 UI 的一部分。

在 HTML 中,如何让 div 显示滚动条,以直观地向用户指示该区域可以滚动?

伊恩

I have a single page app which has scrolling DIVs as part of the UI on our iPhone/iPad app.

In HTML how do I get the div to show a scroll bar to visually indicated to the user that the area can scroll?

Ian

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哽咽笑 2024-10-15 03:36:50

Mobile safari 特别禁用溢出的可滚动 div 上的滚动条。如果不构建自己的可滚动 div 视觉指示器,就没有简单的方法来启用此功能。

Mobile safari specifically disables scroll bars on overflowing scrollable divs. There is no easy way to enable this without building your own scrollable div visual indicator.

〆凄凉。 2024-10-15 03:36:50
/* has to be scroll, not auto */
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
/* has to be scroll, not auto */
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文