ArtQRCode艺术二维码生成js插件

代码说明

ArtQRCode 是基于 qrcode.js 的封装,支持以图片元素为基本单元的二维码绘制。

<div id="qrcode"></div>
<script>
    var options = {
        text: "https://github.com/252860883/ArtQRCode",
        width: 500,
        height: 500,
        codeWidth: 320,
        codeHeight: 320,
        top: 85,
        left: 80,
        /**
         * materials unit options
         */
        materials: {
            border: "./materials/electron/border.png",
            eye: "./materials/electron/eye.png",
            row4: "./materials/electron/row4.png",
            col4: "./materials/electron/col3.png",
            row2col3: "./materials/electron/row2col3.png",
            row3col2: "./materials/electron/row3col2.png",
            col3: ["./materials/electron/col3.png", "./materials/electron/col3_2.png"],
            row2col2: "./materials/electron/row2col2.png",
            corner: "./materials/electron/corner.png",
            row2: ["./materials/electron/row2.png", "./materials/electron/row2_2.png"],
            col2: "./materials/electron/col2.png",
            single: ["./materials/electron/single.png", "./materials/electron/single_2.png"],
        }
    }
   /**
    * when the artqrcode loaded, run this function
    */
    function callBack(status) {
        console.log(status) // [loaded|success]
    }
    var qrcode = new QRCode(document.getElementById("qrcode"), options, callBack);
</script>

人已赞赏
各类代码

qq分享网站自定义标题简介和图标的代码

2019-11-23 20:56:06

各类代码

利用CSS给网站挂上灯笼

2020-1-27 11:41:07

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索