scroll-view 组件为什么 scroll-x 不启用

发布于 6 年前作者 min567779 次浏览最后编辑 6 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

左右可滑动

  • 复现路径

  • 提供一个最简复现 Demo

<scroll-view class="scroll-view_H" scroll-x style="width: 100%">
    <view id="green" class="scroll-view-item_H bc_green"></view>
    <view id="red" class="scroll-view-item_H bc_red"></view>
    <view id="yellow" class="scroll-view-item_H bc_yellow"></view>
    <view id="blue" class="scroll-view-item_H bc_blue"></view>
  </scroll-view>

scroll-x 不启用    而scroll-y是正常的,复制官方文档事例代码也不行,是怎么回事呢?

1 回复
yinchao
yinchao1 楼4 年前

宽度要够满屏幕后才会滚动呢 white-space:nowrap;