jquery-qrcode.js 二维码带 logo

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <script src="jquery-3.3.1.min.js"></script>
 5     <script src="jquery-qrcode.js"></script>
 6     <!--
 7         //样例地址
 8         https://larsjung.de/jquery-qrcode/latest/demo/
 9         //jquery-qrcode.js下载地址
10         https://github.com/lrsjng/jquery-qrcode
11     -->
12     <style type="text/css">
13         #img-buffer {
14             display: none;
15         }
16     </style>
17 </head>
18 <body>
19     <div id="qrcode"></div>
20     <img src="img/1.jpg" id="img-buffer">
21     <script type="text/javascript">
22         $(‘#qrcode‘).qrcode({
23             render: ‘canvas‘,    //设置渲染方式,有table和canvas,使用canvas方式渲染性能相对来说比较好
24             minVersion: 1,       // version range somewhere in 1 .. 40
25             maxVersion: 40,
26             ecLevel: ‘L‘,        //识别度  ‘L‘, ‘M‘, ‘Q‘ or ‘H‘
27             left: 0,
28             top: 0,
29             size: 200,           //尺寸
30             fill: ‘#000‘,        //二维码颜色
31             background: null,    //背景色
32             text: ‘no text‘,     //二维码内容
33             radius: 0.1,         // 0.0 .. 0.5
34             quiet: 2,            //边距
35
36             // modes
37             // 0: normal
38             // 1: label strip
39             // 2: label box
40             // 3: image strip
41             // 4: image box
42             mode: 4,
43             mSize: 0.3,          //图片大小
44             mPosX: 0.5,
45             mPosY: 0.5,
46
47             label: ‘jQuery.qrcode‘,
48             fontname: ‘sans‘,
49             fontcolor: ‘#000‘,
50             image: $("#img-buffer")[0]
51         });
52     </script>
53 </body>
54 </html>

原文地址:https://www.cnblogs.com/gygang/p/9116140.html

时间: 2024-08-01 07:12:48

jquery-qrcode.js 二维码带 logo的相关文章

使用jquery.qrcode生成二维码实现微信分享功能

前言: 最近有个这样的需求,在pc端的商品详情页增加分享功能. 微博分享.QQ好友分享.QQ空间分享这些都很常见.但是微信分享我还没有手动写过(以前改过). 最终效果如下图: 解决方案:使用jquery.qrcode插件生成二维码 jquery.qrcode cdn地址 参见: https://www.bootcdn.cn/jquery.qrcode/ 1.加载 jQuery 和 jquery.qrcode.js: <script src="https://cdn.bootcss.com/

JAVA使用Qrcode.jar 制作二维码带logo

今天学习如何生成二维码,网上二维码生成的教程很多,有使用google zxing.jar的,也有使用Qrcode.jar的.我使用的是Qrcode.jar,代码来自网上的教程.代码不长,也很好理解.个人水平比较低,也是拿来主义,写一个随笔以备日后使用.生成二维码代码如下: try { Qrcode qrcodeHandler = new Qrcode(); //设置二维码排错率,可选L(7%).M(15%).Q(25%).H(30%),排错率越高可存储的信息越少,但对二维码清晰度的要求越小 qr

vue生成条形码/二维码/带logo二维码

条形码:https://blog.csdn.net/dakache11/article/details/83749410 //安装 cnpm install @xkeshi/vue-barcode //main.js中引入 import VueBarcode from '@xkeshi/vue-barcode' Vue.component('barcode', VueBarcode) //vue文件中使用 <!-- 条形码 --> <barcode :value="barcod

jquery.qrcode生成二维码

qrcode其实是通过使用jQuery实现图形渲染,画图,支持canvas(HTML5)和table两种方式,github地址:https://github.com/jeromeetienne/jquery-qrcode 以下是demo: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Qrcod

使用jquery.qrcode生成二维码

1.首先在页面中加入jquery库文件和qrcode插件. <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.qrcode.min.js"></script> 2.在页面中需要显示二维码的地方加入以下代码: <div id=&

使用jquery.qrcode生成二维码(转)

jQuery 的 qrcode 插件就可以在浏览器端生成二维码图片. 这个插件的使用非常简单: 1.首先在页面中加入jquery库文件和qrcode插件. 代码   <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.qrcode.min.js">

jquery.qrcode 生成二维码

识别字符串 1.首先下载 jquery.qrcode 插件后,在页面中引入 jquery 库文件和 qrcode 插件. <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.qrcode.min.js"></script>  2.在页

asp.net(C#)利用QRCode生成二维码(续)-在二维码图片中心加Logo或图像 .

<%@ WebHandler Language="C#" Class="GetQRCode" %> using System; using System.Web; using ThoughtWorks.QRCode.Codec; using ThoughtWorks.QRCode.Codec.Data; using ThoughtWorks.QRCode.Codec.Util; using System.IO; using System.Text; us

java 通过Qrcode生成二维码添加图片logo和文字描述

/** * 二维码创建 * @author yhzm * */ public class printServiceImpl extends BaseService { public void barCodeGenera() { init(false); //先创建一个二维码 String text = strRequiredParam("barcode","二维码信息"); String desc = strRequiredParam("desc"