龙溪网站建设企业,2345网址导航app,二级域名分发,中国域名门户网站写了一个横向滚动#xff0c;超出可视区域图片空白#xff0c;上下滚动页面可视区域图片显示#xff0c;不可见区域滚动出来变成空白 错误css如下 width: 678rpx;height: 264rpx;background: #ffffff;border-radius: 16rpx;margin: 64rpx 18rpx 10rpx 18rpx;overflow-y: hid…写了一个横向滚动超出可视区域图片空白上下滚动页面可视区域图片显示不可见区域滚动出来变成空白 错误css如下 width: 678rpx;height: 264rpx;background: #ffffff;border-radius: 16rpx;margin: 64rpx 18rpx 10rpx 18rpx;overflow-y: hidden;overflow-x: auto;display: flex;flex-wrap: nowrap;justify-content: flex-start;在UniApp中实现横向滚动并且溢出显示空白可以使用scroll-view组件。 templateview classcontainerscroll-view classscroll-view scroll-xview classitem v-for(item, index) in items :keyindex{{ item }}/view/scroll-view/view
/templatestyle
.container {width: 100%;height: 200px;overflow-x: scroll;
}.scroll-view {white-space: nowrap;
}.item {display: inline-block;width: 100px;height: 100px;background-color: #ccc;margin-right: 10px;
}
/stylescript
export default {data() {return {items: [Item 1, Item 2, Item 3, Item 4, Item 5]};}
};
/script