Signature pad
How do I make an signature pad?
What is a signature pad? How do you make a signature pad? This script and codes were developed by Revolution Graphics on 01 October 2022, Saturday.
Signature pad - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>signature pad</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="signature-pad" class="m-signature-pad"> <div class="m-signature-pad--body"> <canvas></canvas> </div> <div class="m-signature-pad--footer"> <div class="description">Sign above</div> <button class="button clear" data-action="clear">Clear</button> <button class="button save" data-action="save">Save</button> </div> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://szimek.github.io/signature_pad/js/signature_pad.js'></script> <script src="js/index.js"></script>
</body>
</html>
Signature pad - Script Codes CSS Codes
.m-signature-pad { margin: auto; position: relative; font-size: 10px; width: 480px; height: 300px; border: 1px solid #e8e8e8; background-color: #fff;
}
.m-signature-pad--body { position: absolute; left: 20px; right: 20px; top: 20px; bottom: 60px; border: 1px solid #f4f4f4;
}
.m-signature-pad--body
canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 4px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset; -moz-user-select: -moz-none; -webkit-user-select: none; -ms-user-select: none;
}
.m-signature-pad--footer { position: absolute; left: 20px; right: 20px; bottom: 20px; height: 40px;
}
.m-signature-pad--footer
.description { color: #C3C3C3; text-align: center; font-size: 1.2em; margin-top: 1.8em;
}
.m-signature-pad--footer
.button { position: absolute; bottom: 0;
}
.m-signature-pad--footer
.button.clear { left: 0;
}
.m-signature-pad--footer
.button.save { right: 0;
}
@media screen and (max-width: 1024px) { .m-signature-pad { top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; min-width: 250px; min-height: 250px; margin: 5%; }
}
Signature pad - Script Codes JS Codes
var wrapper = document.getElementById("signature-pad"), clearButton = wrapper.querySelector("[data-action=clear]"), saveButton = wrapper.querySelector("[data-action=save]"), canvas = wrapper.querySelector("canvas"), signaturePad;
// Adjust canvas coordinate space taking into account pixel ratio,
// to make it look crisp on mobile devices.
// This also causes canvas to be cleared.
function resizeCanvas() { var ratio = window.devicePixelRatio || 1; canvas.width = canvas.offsetWidth * ratio; canvas.height = canvas.offsetHeight * ratio; canvas.getContext("2d").scale(ratio, ratio);
}
window.onresize = resizeCanvas;
resizeCanvas();
signaturePad = new SignaturePad(canvas);
clearButton.addEventListener("click", function (event) { signaturePad.clear();
});
saveButton.addEventListener("click", function (event) { window.open(signaturePad.toDataURL());
});
Developer | Revolution Graphics |
Username | rgfx |
Uploaded | October 01, 2022 |
Rating | 3 |
Size | 3,084 Kb |
Views | 44,528 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Icon-font animation troggle | 2,108 Kb |
Canvas Noise generator | 2,904 Kb |
Video-js scss | 13,211 Kb |
Background image mouse scroll | 2,287 Kb |
Progressively reveal dots on a Bezier curve | 7,323 Kb |
CSS Background | 2,293 Kb |
Keep Image in Center of Div. | 2,005 Kb |
SVG as a submit button | 2,128 Kb |
Custom Checkbox and radio inputs SCSS | 3,367 Kb |
Simple Horizontal Stacked Bar | 2,000 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Brent Burns Tribute Page | Nevada48 | 2,569 Kb |
404 Page | Saransh | 2,666 Kb |
Off Canvas | Mariamarica | 1,870 Kb |
Halo 5 REQ Guide Bookmarklet | Cwacht | 3,993 Kb |
Fireworks Show | Arianalynn | 3,048 Kb |
JQuery FullScreen Overlay | _codemics | 2,252 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Retina canvas w. resize | Erikterwan | 1,882 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!