//swiper示例
<template>
<swiper class="content">
<swiper-item>
<scroll-view class="content" :scroll-y="true">
<view style="height: 50rpx;margin:5rpx;background-color: aqua;" v-for="index in 100">{{index}}</view>
</scroll-view>
</swiper-item>
</swiper>
</template>
<style>
.content {
height: 100vh;
width: 100vw;
}
</style>
// 绝对定位结合偏移的样式示例
<template>
<view class="content">
<view style="height: 50rpx;margin:5rpx;background-color: aqua;" v-for="index in 100">{{index}}</view>
</view>
</template>
<style>
.content {
height: 100vh;
width: 100vw;
overflow: scroll;
position: fixed;
top: 0;
left: 0;
transform: translateX(10rpx);
}
</style>