zoukankan      html  css  js  c++  java
  • 点击文字出图片,点击小图出大图

    点击文字弹出图片层 - CSDN博客
    https://blog.csdn.net/kfttdawv/article/details/47782083

    这个更简单:

    html如何实现点击文字弹出二维码图片 - spencerht的回答 - SegmentFault 思否
    https://segmentfault.com/q/1010000011856438/a-1020000011857482

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            #lookup {
                margin-top: 50px;
                border: 1px solid black;
                cursor: pointer;
            }
    
            #authimg img {
                position: absolute;
                top: 50%;
                left: 50%;
                width: 100px;
                height: 100px;
                display: block;
            }
    
            #authimg {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(255, 255, 255, 0.6);
                z-index: 9999;
                display: none;
            }
        </style>
    
        <script src="http://code.jquery.com/jquery-3.2.1.js" ></script>
    </head>
    <body>
        <button id="lookup">查看</button>
        
        <div id="authimg">
            <img id="image" src="https://jkooll.github.io/src/images/wechat_qrcode.jpg">
        </div>
    
        <script>
            $(function() {
                $("#lookup").click(function() {
                    $("#authimg").fadeIn("slow");
                });
    
                $("#authimg").click(function() {
                    $("#authimg").fadeOut("slow");
                })
                
            });
        </script>
    </body>
    </html>

    总结2个点击图片弹层观看的jquery插件 - 初级程序员的资料 - ITeye博客
    http://canlynet.iteye.com/blog/2379492

    精简版

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            #lookup {
                margin-top: 50px;
                border: 1px solid black;
                cursor: pointer;
            }
    
            #authimg img {
                position: absolute;
                top: 50%;
                left: 50%;
                width: 100px;
                height: 100px;
                display: block;
            }
    
            #authimg {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(255, 255, 255, 0.6);
                z-index: 9999;
                display: none;
            }
        </style>
    
        <script src="http://code.jquery.com/jquery-3.2.1.js" ></script>
    </head>
    <body>
        <button id="lookup" onclick="$('#authimg').fadeIn('slow');">查看</button>
        
        <div id="authimg" onclick="$('#authimg').fadeOut('slow');">
            <img id="image" src="https://jkooll.github.io/src/images/wechat_qrcode.jpg">
        </div>
    
       
    </body>
    </html>
  • 相关阅读:
    [HAOI2015][bzoj 4033]树上染色(树dp+复杂度分析)
    20190716NOIP模拟赛T1 礼物(概率dp+状压)
    20190716NOIP模拟赛T2 通讯(tarjan缩点+贪心)
    延迟载入Dll(动态载入Dll)
    Dll重定向(尚存否?)
    delete和delete[] 区别
    06 序列号保护 学习分析(字符串)
    05 初识加壳脱壳
    04 复制删除行为IDA反汇编
    03 复制行为动态分析
  • 原文地址:https://www.cnblogs.com/stevenlii/p/9155414.html
Copyright © 2011-2022 走看看