|
阅读:7669回复:0
微信打开网址添加在浏览器中打开提示
需求 :当在微信打开是出现在浏览器打开的提示 当在浏览器打开时提示消失
如图 图片:1.png
html <div class="tip">
<img src="../../image/touch.png" alt="">
<div class="tit">请用浏览器打开</div>
</div>
css .tip{
display: none;
position: fixed;
left:0;
top:0;
bottom:0;
background: rgba(0,0,0,0.8);
filter:alpha(opacity=80);
height: 100%;
width: 100%;
z-index: 100;
}
.tip .tit{
color: #fff;
/* text-align: center; */
}
.tip img{
max-width: 100%;
height: auto;
}js$(window).on("load",function(){
var winHeight = $(window).height();
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
var isWeixin = is_weixin();
if(isWeixin){
$(".tip").css("height",winHeight);
$(".tip").show();
}
}) |
|
