<template>
<view class="page">
<view class="content">
<!-- 页面内容 -->
</view>
</view>
</template>
<style>
.page {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('要用的图片路径');
background-repeat: no-repeat;
background-size: cover;
}
.content {
overflow-y: scroll;
height: 100%;
}
</style>
uniapp实现固定背景图,页面内容滑动查看
于 2023-11-03 13:34:15 首次发布