scroll-x横向滚动为啥无法滚动。
发布于 5 年前 作者 qfan 1666 次浏览 来自 问答

<view class=‘section1’>

<view class=‘section__title1’>新闻频道横向滚动</view>

<scroll-view scroll-x=“true” style=“width: 100%;” >

<view style=‘display:flex;flex-direction:row’>

<view style=‘margin-right:10px;’>推荐</view>

<view style=‘margin-right:10px;’>推荐2</view>

<view style=‘margin-right:10px;’>推荐3</view>

<view style=‘margin-right:10px;’>推荐4</view>

<view style=‘margin-right:10px;’>推荐5</view>

<view style=‘margin-right:10px;’>推荐6</view>

<view style=‘margin-right:10px;’>推荐7</view>

<view style=‘margin-right:10px;’>推荐8</view>

<view style=‘margin-right:10px;’>图片</view>

<view style=‘margin-right:10px;’>科技</view>

<view style=‘margin-right:10px;’>汽车</view>

<view style=‘margin-right:10px;’>推荐</view>

<view style=‘margin-right:10px;’>推荐</view>

<view style=‘margin-right:10px;’>推荐</view>

<view style=‘margin-right:10px;’>推荐</view>

<view style=‘margin-right:10px;’>推荐</view>

</view>

</scroll-view>

</view>

4 回复

还是没用啊

display:inline-block

不对啊。。我把你scroll-view这一段拷贝到我工程里,可以滚啊。。你来个代码片段呢。。

回到顶部