【JavaScript】纯JS生成二维码的几种方法
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
一: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 编辑过 |
关键字查询
相关文章
正在查询... |