使用scroll-view 进行横向滚动的时候,如何每次滚动都显示一个完整的区域?

小程序 文章 2021-01-29 09:41 532 0 全屏看文

AI助手支持GPT4.0

使用scroll-view 进行横向滚动的时候,如何每次滚动都显示一个完整的区域?When using scroll-view to scroll horizontally, how to display a complete area every time I scroll?

使用scroll-view 进行横向滚动的时候,如何每次滚动都显示一个完整的区域?

要如何才能每次一滚动都显示像图一一样完整的区域,而不是像图二这样停留在中间的位置呢

How to display the complete area as shown in Figure 1 each time you scroll, instead of staying in the middle as shown in Figure 2

回答:

威风扫地飞:

Mr.G:

自己监听滑动事件,触发的时候,手动向左或向右滑动一屏像素的距离,就OK了

brave:

swiper 比较适合你的需求。

小黎:

你把这一块弄成一个item

Ain:

用swiper把

-EOF-

AI助手支持GPT4.0