<div class="mask_weixin"></div>
<script src="./js/jquery.js"></script>
<script>
// 判断是否在微信打开
function isWeixin() {
var nu = navigator.userAgent.toLowerCase();
if (nu.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
let isWX = isWeixin();
if(isWX){
$('.mask_weixin').append("<div class='mask'><img src='./img/browser.png' /></div>");
}
</script>
<style>
/* 遮罩 */
.mask{
position:fixed;
top:0;
left:0;
bottom:0;
right:0;
width:100%;
height:100%;
display:flex;
justify-content:center;
align-items:flex-start;
z-index: 100;
background:rgba(0,0,0,0.8);
}
.mask img{
width:calc(100% - 40px);
height:auto;
margin-top:20px;
}
</style>
<div class="mask_weixin"></div>
<script src="./js/jquery.js"></script>
<script>
// 判断是否在微信打开
function isWeixin() {
var nu = navigator.userAgent.toLowerCase();
if (nu.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
let isWX = isWeixin();
if(isWX){
$('.mask_weixin').append("<div class='mask'><img src='./img/browser.png' /></div>");
}
</script>
<style>
/* 遮罩 */
.mask{
position:fixed;
top:0;
left:0;
bottom:0;
right:0;
width:100%;
height:100%;
display:flex;
justify-content:center;
align-items:flex-start;
z-index: 100;
background:rgba(0,0,0,0.8);
}
.mask img{
width:calc(100% - 40px);
height:auto;
margin-top:20px;
}
</style>