css - 为没有滚动条的触摸设备创建可滚动区域

标签 css

我正在尝试为触摸设备构建一个水平可滚动区域,如果可能的话,只使用 CSS。我目前有这样的预期设置:

.wrapper {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
}

.inner {
  width: 5000px;
  height: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

我不会让您厌烦 HTML!任何想法,任何人?

最佳答案

经过一些研究,我认为这可能是最好的方法:

https://github.com/ibspoof/ng-iScroll

关于css - 为没有滚动条的触摸设备创建可滚动区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17325777/

相关文章:

html - CSS 垂直对齐底部问题

css - Angular 4 Material 2 从输入控件中删除占位符上标和错误下标空间

javascript - 对文档中的所有元素使用函数

html - Bootstrap 导航栏不适用于 Chrome

python - 使用@font face 时在 QtWebEngine 中忽略 Google 字体 (ttf)

css - Bootstrap : Add a button link in the bottom right corner of a thumbnail

Jquery - 计算元素的高度总和

html - 无法将 div 框对齐到中心

html - Bootstrap 导航栏以特定宽度创建两行

html - 如何在 div 中水平和垂直居中图像和文本?