zoukankan      html  css  js  c++  java
  • 鼠标移过显示二维码代码

    $(document).ready(function(){
        var t,t1;
        $(".side ul li.code-wrap").hover(function(){
            var _this = $(this);
            clearTimeout(t1);
            t = setTimeout(function(){
                _this.find('.popup').show();
            },300)
        },function(){
            var _this = $(this);
            clearTimeout(t);
            t1=setTimeout(function(){
                _this.find('.popup').hide();
            },100)
        });
    });
    <li class="code-wrap">
                <a href="#"><div class="sidebox"><img src="../assets/img/icon_code.png">二维码</div></a>
                <div class="popup">
                    <a class="code-link">
                        <img class="code" src="../assets/img/weixin_code.png">
                    </a>
                    <span>加真源为微信好友</span>
                    <div class="arr"></div>
                </div>
            </li>
                .popup {
                    display: none;
                    position: absolute;
                    left: -180px;
                    bottom: 0;
                    text-align: center;
                    border-radius: 2px;
                    width: 170px;
                    height: 200px;
                    background: #fff;
                    box-shadow: 0 1px 8px rgba(0,0,0,.1);
                    font-size: 14px;
                    .code-link {
                        display: block;
                        margin: 10px;
                        color: #777;
                        .code {
                            display: block;
                            margin-bottom: 10px;
                        }
                    }
                    .arr {
                        position: absolute;
                        right: -6px;
                        bottom: 14px;
                        width: 6px;
                        height: 11px;
                        background: url(../img/code_arrow.png) 0 0 no-repeat;
                    }
                }
  • 相关阅读:
    eclipse中文乱码
    学习进度(7)
    校园管家(Android开发团队项目)NABCD
    NABCD(团队项目)
    android studio连接真机大概问题
    01梦断代码阅读笔记
    学习进度(6)
    android studio学习(一)
    地铁出行系统1.0
    学习进度(4)
  • 原文地址:https://www.cnblogs.com/anyaran/p/4221723.html
Copyright © 2011-2022 走看看