扫一扫分享
qrious是一款基于html5 Canvas的纯JS二维码生成插件。通过qrious.js可以快速生成各种二维码,你可以控制二维码的尺寸颜色,还可以将生成的二维码进行Base64编码。
.d88888b. 8888888b. d8b
d88P" "Y88b 888 Y88b Y8P
888 888 888 888
888 888 888 d88P 888 .d88b. 888 888 .d8888b
888 888 8888888P" 888 d88""88b 888 888 88K
888 Y8b 888 888 T88b 888 888 888 888 888 "Y8888b.
Y88b.Y8b88P 888 T88b 888 Y88..88P Y88b 888 X88
"Y888888" 888 T88b 888 "Y88P" "Y88888 88888P'
Y8b
安装
npm install --save qrious
# OR:
bower install --save qrious
例子
<!DOCTYPE html>
<html>
<body>
<canvas id="qr"></canvas>
<script src="/path/to/qrious.js"></script>
<script>
(function() {
var qr = new QRious({
element: document.getElementById('qr'),
value: 'https://github.com/neocotic/qrious'
});
})();
</script>
</body>
</html>
手机预览