plus.webview.create("zhezhao.html", "zhezhao.html", {
width: '200px',
height: '200px',
margin: "auto",
background: "rgba(0,0,0,0.3)",
scrollIndicator: 'none',
scalable: false,
popGesture: 'none'
});
如何实现点击webview窗口之外的灰色区域,能够关闭webview。
![1***@qq.com](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/000/66/43/15_avatar_mid.jpg?v=0)
1***@qq.com
- 发布:2018-02-02 09:22
- 更新:2018-02-02 15:15
- 阅读:1313
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20180202/77529bcee58cc8a2858029a2035bb817.jpg)
![爪哇子](https://img-cdn-tc.dcloud.net.cn/account/identicon/d94364d60979d723d9889febe336370d.png)
var t = plus.webview.create('text.html','text', {
width: '200px',
height: '200px',
margin: "auto",
background: "rgba(0,0,0,0.2)",
mask:'rgba(0,0,0,0)',
scrollIndicator: 'none',
scalable: false,
backButtonAutoControl:'none',
popGesture: 'none'
})
t.show()
t.addEventListener('maskClick', function(e){
t.close()
}, false );