【JavaScript】純JS生成二維碼的幾種方法
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
一:arale-qrcodenpm i arale-qrcode
<html>
<body>
<div id="share_tools"></div>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="./js/qrcode.min.js" type="text/javascript"></script> <style type="text/css"> #qrcode { position: relative; }
#qrcode::after { content: ''; display: block; width: 50px; height: 50px; background: url(https://waibi.oss-cn-chengdu.aliyuncs.com/2020-06-01/head.jpg) no-repeat; background-size: 50px 50px; border-radius: 5px; box-shadow: 1px 1px 10px #000; position: absolute; top: 106px; left: 102px; } </style> </head> <body> <div id="qrcode"></div> <script type="text/javascript"> var qrcode = new QRCode(document.getElementById("qrcode"), { text: "https://vampireachao.gitee.io/", width: 256, height: 256, colorDark: "#000000", colorLight: "#ffffff", correctLevel: QRCode.CorrectLevel.H }); </script> </body> </html> 三:QR碼生成器<img style="width: 300px;height: 300px;" src="https://api.qrserver.com/v1/create-qr-code?data=http://goqr.me/api/" >
該文章在 2023/6/14 16:22:01 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |