zoukankan      html  css  js  c++  java
  • js判断微信 选择浏览器打开

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
    body{
    font-family: 微软雅黑;
    margin: 0;

    }
    body a{
    display: block;
    text-decoration: none;
    text-align: center;
    }
    #a{
    font-family: 微软雅黑;
    background: url("images/e.jpg");
    background-size: 100%;
    overflow: hidden;
    height: 100vh;
    display: none !important;
    }
    .top{
    margin-top: 50em;
    }
    .b{
    margin-top: 4em;
    }
    .tishi{

    display: block;
    height: 100vh;
    text-align: right;
    background: url("images/h.jpg");
    background-size: 100%;
    background-position: top center;
    /*display: none;*/
    }
    .tishi img{

    display: inline-block;
    40%;
    }

    </style>
    </head>
    <body>
    <script type="text/javascript">
    window.onload=function is_weixin(){
    var xia=document.getElementById('a');
    var zip= document.getElementById('ti');
    var ua = navigator.userAgent.toLowerCase();
    if(ua.match(/MicroMessenger/i)=="micromessenger") {
    zip.style.display="block";
    return true;
    } else {
    xia.style.display="block";
    return false;
    }
    }

    </script>
    <div class="zip" id="a">
    <a href="" class="top">
    <img src="images/c.png">
    </a>

    <a class="b" href="">
    <img src="images/b.png">
    </a>
    </div>

    <a class="tishi" id="ti" href="">
    <img src="images/d.png">
    </a>



    </body>
    </html>

  • 相关阅读:
    springboot自动装配原理
    @Inherited 注解的作用
    基础知识点:链表反转
    基础知识点:二叉树的层次遍历
    算法题:8、二进制中1的个数
    微服务_GPRC
    扎实基础_数据结构
    .net core3.0程序发布到linux+docker
    c#_安全漏洞总结
    IIS Express(电脑无管理员权限如何启用VS调试)
  • 原文地址:https://www.cnblogs.com/gxw123/p/7601727.html
Copyright © 2011-2022 走看看