想了解免费建站的朋友,查看《免费建站教程》

仿百度落地页的点击微信弹窗

2020-09-09 1326 建站
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>   
<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script>  
<script>  
//微信号
var theArray = ['00000000'];
var stxlwx = theArray[Math.floor(Math.random()*theArray.length)];
var stxlwximg="<img src='"+stxlwx+".jpg'>";
function tfsvfli6021(){
document.getElementById("copy6021").click();
}
    $(document).ready(function(){       
        var clipboard = new Clipboard('#copy6021');    
        clipboard.on('success', function(e) {    
           document.getElementById("tacc").style.display="block";
            window.location.href='weixin://';
            e.clearSelection();    
            console.log(e.clearSelection);    
        });    
    }); 
    function coo(){
           document.getElementById("tacc").style.display="none";}
</script>
  <style type="text/css" media="all">
  @font-face {
  font-family: 'iconfont2';  /* project id 2056593 */
  src: url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.eot');
  src: url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.eot?#iefix') format('embedded-opentype'),
  url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.woff2') format('woff2'),
  url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.woff') format('woff'),
  url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.ttf') format('truetype'),
  url('http://at.alicdn.com/t/font_2056593_qyaa7mymky.svg#iconfont') format('svg');
}
.iconfont2{
    font-family:"iconfont2" !important;
    font-size:16px;font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;vertical-align: middle; padding: 0 10px;color: rgb(26, 173, 25); font-size: 28px;}
.vvxw{-webkit-animation: gvg 3s linear infinite; animation: gvg 3s linear infinite; } @keyframes gvg { 0%{ transform: scale(1); } 25%{ transform: scale(0.8); } 50%{ transform: scale(1); } 75%{ transform: scale(0.8); } }
</style>
<script>  
document.writeln("<div style='opacity:0;position:absolute;top:-99999px;'><i id='copytex'>"+stxlwx+"</i><button data-clipboard-action='copy' data-clipboard-target='#copytex' id='copy6021'>复制</button></div>");
</script>
    <div style=" background: #f3f3f3; font-size: 0.8rem; height: 3rem; display: table; vertical-align: middle; width: 100%; line-height: 3rem; position: relative;">
        <i class="iconfont2">&#xe61b;</i>添加微信好友了解产品<span style=" position: absolute; right: 10px; background: #1aad19; border-radius: 30px; height: 2.5rem; width: 80px; text-align: center; line-height: 2.5rem; top: 5px; color: white;font-size: 0.9rem;cursor: pointer; " class="vvxw" onclick="tfsvfli6021()">+&nbsp;关注</span></div>
    <div id="tacc" style=" position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 84%; margin: auto; height: 243px; background: white; display: none; z-index: 999; border-radius: 15px; "> <i class="iconfont2" style=" display: block; text-align: center; font-size: 3rem; padding: 22px 0 0 0; ">&#xe601;</i> <span style=" display: block; text-align: center; font-weight: bold; padding: 10px 0; ">复制成功</span> <span style=" display: block; text-align: center; color: #636363; ">微信号: <script>document.write(stxlwx);</script></span> <span style=" display: block; text-align: center; color: #636363; ">添加微信好友, 详细了解产品</span> <span style=" display: block; text-align: center; background: #1aad19; color: white; width: 100px; margin: 22px auto; border-radius: 7px; line-height: 2.5rem;cursor: pointer; " onclick="coo()">知道了</span><i class="iconfont2" style="display: block;text-align: center;font-size: 1rem;padding: 22px 0 0 0;cursor: pointer;color: #797979;top: -11px;right: 6px;width: 30px;position: absolute;" onclick="coo()">&#xe61a;</i></div>


版权保护: 转载请保留链接: https://cgy.isi8.cn/jianzhan/222.html