欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序?qū)崿F(xiàn)蒙版彈出窗功能

 更新時(shí)間:2019年09月17日 13:06:55   作者:張優(yōu)秀  
這篇文章主要介紹了微信小程序?qū)崿F(xiàn)蒙版彈出窗功能,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

話不多說 上代碼。

wxml:

<view class="page">

 <button bindtap="showMask"> 彈出 </button>
 <view catchtouchmove="preventTouchMove" class="alert-mask" wx:if="{{showModal}}"></view>
 <view class="modalDlg" wx:if="{{showModal}}">
  <view class="modelTitle">我是標(biāo)題</view>
  <view class="modeContent">
   我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容我是內(nèi)容
  </view>
  <image class="hide-btn" bindtap="hideMask" src="./../images/tripDetailAlertHide.png"></image> 
 </view>
</view>


wxss:

/* 彈窗蒙版 start */
.alert-mask {
 width: 100%;
 height: 100%;
 position: fixed;
 top: 0;
 left: 0;
 background: #000;
 z-index: 9000;
 opacity: 0.7;
}
.modalDlg {
 width: 80%;
 height: 55%;
 position: fixed;
 top: 45%;
 left: -1%;
 z-index: 9999;
 box-sizing: border-box;
 padding: 25rpx;
 margin: -370rpx 85rpx;
 background-color: #fff;
 border-radius: 18rpx;
 display: flex;
 flex-direction: column;
 align-items: center;
}
.modelTitle{
 font-size: 38rpx;
 margin-bottom: 20rpx;
}
.hide-btn {
 position: absolute;
 top: 10rpx;
 right: 10rpx;
 width: 50rpx;
 height: 50rpx;
}

/* 彈窗蒙版 end*/
js:

Page({
 data: {
  showModal: false
 },
 onLoad(o) {
 },
  showMask: function () {
  this.setData({
   showModal: true
  })
 },
 hideMask: function () {
  this.setData({
   showModal: false
  })
 },
})

總結(jié)

以上所述是小編給大家介紹的微信小程序?qū)崿F(xiàn)蒙版彈出窗功能,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!

相關(guān)文章

最新評(píng)論