Skip to content

Instantly share code, notes, and snippets.

@VincentLoy
Last active March 15, 2018 12:46
Show Gist options
  • Save VincentLoy/28abbcc05944c0010f687a76164c48f9 to your computer and use it in GitHub Desktop.
Save VincentLoy/28abbcc05944c0010f687a76164c48f9 to your computer and use it in GitHub Desktop.
scanit example html
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>scanit.js</title>
<!-- JUST ADD SOME STYLES FOR YOU QR CODE ELEMENT (Basically, a square) -->
<style>
.qrContainer {
width: 450px;
height: 450px;
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<!-- All you need to do is to add "data-scanit" attribute to an element and that'll generate a QRCode base on the value inside -->
<div class="qrContainer" data-scanit="http://vincent-loy.fr/"></div>
<!-- Add The Script (or min file script) -->
<script src="dist/scanit.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment