card
Version:
Card lets you add an interactive, CSS3 credit card animation to your credit card form to help your users through the process.
50 lines (43 loc) • 1.3 kB
HTML
<html>
<head>
<title>Card – the better way to collect credit cards</title>
<meta name="viewport" content="initial-scale=1">
<!-- CSS is included through the card.js script -->
</head>
<body>
<style>
.demo-container {
width: 100%;
max-width: 350px;
margin: 50px auto;
}
form {
margin: 30px;
}
input {
width: 200px;
margin: 10px auto;
display: block;
}
</style>
<div class="demo-container">
<div class="card-wrapper"></div>
<div class="form-container active">
<form action="">
<input placeholder="Card number" type="tel" name="number">
<input placeholder="Full name" type="text" name="name">
<input placeholder="MM/YY" type="tel" name="expiry">
<input placeholder="CVC" type="number" name="cvc">
</form>
</div>
</div>
<script src="http://localhost:8080/card.js"></script>
<script>
var c = new Card({
form: document.querySelector('form'),
container: '.card-wrapper'
});
</script>
</body>
</html>