zoukankan      html  css  js  c++  java
  • jquery生成二维码

    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>二维码</title>
    </head>
    <style>
        #qrcode{
            position: relative;
            width: 400px;
            height: 400px;
            margin: 0 auto;
        }
        .logo{
            position: absolute;
            width: 100px;
            margin: auto;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            height: 37px;
            z-index: 222;
        }
        .logo img{
            width: 100px;
        }
    </style>
    <body>
        
    
    
    <div id="qrcode">
        <div class="logo">
            <img src="1.jpg" alt="">
        </div>
    </div>
    </body>
    <script type='text/javascript' src='http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js'></script>
    <script type="text/javascript" src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
    <script>
    $(function(){
        //$('#qrcode').qrcode("http://pmi.yoopay.cn/");
        // 更详细的配置
             $('#qrcode').qrcode({
                text: "http://pmi.yoopay.cn/", // 要编码的字符串
                 400, // 定义宽度
                 height: 400, // 定义高度
                 background: "#fff", // 背景色
                foreground: "black" // 前景色
           // qrcode.clear(); // 清除二维码
    }); }) </script> </html>

  • 相关阅读:
    Win10查毒
    Hexo博客快速部署
    Hexo各文件夹的作用
    Gitee+HEXO搭建个人博客
    Butterfly 主题设置
    JAVA 正则表达式学习网站 非捕获匹配
    jsPlump线路调整集合
    Spring-boot demo 集合
    多线程学习
    Spring boot 开发指导
  • 原文地址:https://www.cnblogs.com/mymission/p/5765874.html
Copyright © 2011-2022 走看看