css3 弹出层居中(防止穿透滚动)
<view class="mask" v-if="lookUpTips" @touchmove.stop.prevent="catchtouchmove"></view> <view class="popup-draw-active" v-if="lookUpTips" @touchmove.stop.prevent="catchtouchmove"> lst </view> .mask{ position: fixed; top: 0; left: 0; z-index: 10; background-color:rgba(0,0,0,0.9); } .popup-draw-active{ position: fixed; top: 50%; left: 50%; z-index: 11; width: 640rpx; height: 600rpx; padding: 30rpx; border-radius: 24rpx; background-color: #ffb4c7; transform: translate(-50%, -50%) scale(1); opacity: 1; transition: .3s; line-height: 1; text-align: center; color: #282828; background-repeat: round; background-size: 100%; } methods: { catchtouchmove() { return; }, }