使用鼠标无法实现滚动
来源:2-8 scroll-view 可滚动视图 纵向

乃好
2019-05-12
在视频中三分钟左右,老师演示了用鼠标拖动着进行滚动,可是我却无法实现。以下是我的代码,麻烦老师帮我检查一下。
<!--index.wxml-->
<scroll-view scroll-y="true" style='height:300rpx;'>
<view class="a size">a</view>
<view class="b size">b</view>
<view class="c size">c</view>
<view class="d size">d</view>
<view class="e size">e</view>
</scroll-view>
/**index.wxss**/
.container{
display: flex;
/* row:默认从左到右排序 */
/* row-reverse:从右到左排序 */
/* column:从上到下排序 */
/* column-reverse:从下到上排序 */
/* flex-direction: */
/* nowrap:默认不换行 */
/* wrap:换行 */
/* wrap-reverse:逆向换行 */
/* flex-wrap: */
/* flex-start:默认左对齐 */
/* flex-end:右对齐 */
/* center:居中对齐 */
/* space-around:中间和两侧有空格平均分配 */
/* space-between:只有中间有空格平均分配 */
/* justify-content: space-between; */
}
.size{
width: 100%;
height: 150rpx;
}
.a{
background: red;
order: 1;
flex: 3;
}
.b{
background: yellow;
order: 2;
flex: 2;
}
.c{
background: blue;
order: 5;
flex: 1;
}
.d{
background: green;
order: 3;
flex: 1;
}
.e{
background: orange;
order: 4;
flex: 1;
}
值得一提的是,我使用的电脑是带触屏功能的,所以我试着用手指去滑动是可以的,并且我在手机上测试该功能也是正常的。
可是如果无法直接使用鼠标进行测试可能会对以后的测试带来不便。(鼠标也是好的)
写回答
2回答
-
乃好
提问者
2019-05-12
如图,只要是在小程序的这块区域的操作都是有效果的
00 -
风间影月
2019-05-12
你这应该是电脑屏幕机制问题,代码啥的没啥问题,没事的,目前都ok
022019-05-12
相似问题