【问题标题】:How to fix increasing Scrollbar thumb size while scroll of a div in iPad如何在 iPad 中滚动 div 时修复增加的滚动条拇指大小
【发布时间】:2014-04-09 05:19:35
【问题描述】:

当我在 iPad 中滚动 'overflow-y:scroll' div 时,滚动条拇指大小不断增加。知道如何解决这个设计中断吗?

position: absolute;
max-height: 200px; 
overflow-y: scroll; 
overflow-x: hidden; 

以上是为元素设置的基本样式。

这是它在 iPad 中滚动到 div 几乎底部时的样子。

这是预期的行为:

【问题讨论】:

  • 位置:绝对;最大高度:200px;溢出-y:滚动;溢出-x:隐藏;
  • 以上是为元素设置的基本样式。
  • @user3513687 你在使用自定义滚动条吗?你能在 jsFiddle 中做一个例子吗?问题不够清楚。

标签: html ipad css


【解决方案1】:

尝试使用原生滚动:-webkit-overflow-scrolling: touch;

Safari Developer Library Reference

我尝试用 ipad 模拟器 http://codepen.io/anon/pen/kApKB 重现此行为

问题也可能是高度可变。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-28
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    • 1970-01-01
    • 2019-12-16
    • 2019-05-31
    • 2023-03-28
    相关资源
    最近更新 更多