简介
解决办法
<template>
<view class="content">
<view class="top"></view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss">
//解决方式
.content{
overflow:auto;
//或者
padding-top:0.1px;
}
.top{
//元素设置上外边距,导致整体出现滚动条
width:100%;
height:30px;
background-color:red;
margin-top:30px;
}
</style>