-
Notifications
You must be signed in to change notification settings - Fork 4
/
Card2.txt
150 lines (120 loc) · 4.93 KB
/
Card2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- custom css file link -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
<div class="card-container">
<div class="front">
<div class="image">
<img src="image/chip.png" alt="">
<img src="image/visa.png" alt="">
</div>
<div class="card-number-box">################</div>
<div class="flexbox">
<div class="box">
<span>card holder</span>
<div class="card-holder-name">full name</div>
</div>
<div class="box">
<span>expires</span>
<div class="expiration">
<span class="exp-month">mm</span>
<span class="exp-year">yy</span>
</div>
</div>
</div>
</div>
<div class="back">
<div class="stripe"></div>
<div class="box">
<span>cvv</span>
<div class="cvv-box"></div>
<img src="image/visa.png" alt="">
</div>
</div>
</div>
<form action="">
<div class="inputBox">
<span>card number</span>
<input type="text" maxlength="16" class="card-number-input">
</div>
<div class="inputBox">
<span>card holder</span>
<input type="text" class="card-holder-input">
</div>
<div class="flexbox">
<div class="inputBox">
<span>expiration mm</span>
<select name="" id="" class="month-input">
<option value="month" selected disabled>month</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="inputBox">
<span>expiration yy</span>
<select name="" id="" class="year-input">
<option value="year" selected disabled>year</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>
<option value="2026">2026</option>
<option value="2027">2027</option>
<option value="2028">2028</option>
<option value="2029">2029</option>
<option value="2030">2030</option>
</select>
</div>
<div class="inputBox">
<span>cvv</span>
<input type="text" maxlength="4" class="cvv-input">
</div>
</div>
<input type="submit" value="submit" class="submit-btn">
</form>
</div>
<script>
document.querySelector('.card-number-input').oninput = () =>{
document.querySelector('.card-number-box').innerText = document.querySelector('.card-number-input').value;
}
document.querySelector('.card-holder-input').oninput = () =>{
document.querySelector('.card-holder-name').innerText = document.querySelector('.card-holder-input').value;
}
document.querySelector('.month-input').oninput = () =>{
document.querySelector('.exp-month').innerText = document.querySelector('.month-input').value;
}
document.querySelector('.year-input').oninput = () =>{
document.querySelector('.exp-year').innerText = document.querySelector('.year-input').value;
}
document.querySelector('.cvv-input').onmouseenter = () =>{
document.querySelector('.front').style.transform = 'perspective(1000px) rotateY(-180deg)';
document.querySelector('.back').style.transform = 'perspective(1000px) rotateY(0deg)';
}
document.querySelector('.cvv-input').onmouseleave = () =>{
document.querySelector('.front').style.transform = 'perspective(1000px) rotateY(0deg)';
document.querySelector('.back').style.transform = 'perspective(1000px) rotateY(180deg)';
}
document.querySelector('.cvv-input').oninput = () =>{
document.querySelector('.cvv-box').innerText = document.querySelector('.cvv-input').value;
}
</script>
</body>
</html>