-
Notifications
You must be signed in to change notification settings - Fork 0
/
tarjeta.html
124 lines (106 loc) · 2.96 KB
/
tarjeta.html
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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pago con Tarjeta</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #FFFFFF;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #000000;
}
.form-header {
position: relative;
margin-bottom: 20px;
}
.form-header::after {
content: "Formulario de Pago con Tarjeta";
position: absolute;
bottom: -20px;
left: 0;
width: 100%;
text-align: center;
color: #FFFFFF;
font-size: 16px;
}
form {
margin-top: 20px;
}
label {
display: block;
margin-bottom: 10px;
color: #333333;
}
input[type="text"],
input[type="number"],
input[type="date"] {
width: calc(100% - 20px); /* Ancho del 100% menos el margen de 20px */
padding: 10px;
margin-bottom: 30px; /* Cambiado a 30px */
border: 1px solid #333333;
border-radius: 4px;
box-sizing: border-box;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
outline: none;
border-color: #FFD700;
}
.buttons-container {
display: flex;
justify-content: space-between;
}
button {
width: calc(50% - 15px); /* Ancho del 50% menos el margen de 15px */
padding: 8px;
background-color: #800020;
border: none;
border-radius: 4px;
color: #FFFFFF;
font-size: 14px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #191970;
}
</style>
</head>
<body>
<h1>Formulario de Pago con Tarjeta</h1>
<form id="payment-form">
<label for="card-number">Número de Tarjeta:</label>
<input type="text" id="card-number" name="card-number" required>
<label for="card-holder">Titular de la Tarjeta:</label>
<input type="text" id="card-holder" name="card-holder" required>
<label for="expiry-date">Fecha de Expiración:</label>
<input type="date" id="expiry-date" name="expiry-date" required>
<label for="cvv">CVV:</label>
<input type="text" id="cvv" name="cvv" maxlength="3" required>
<button type="submit">Pagar</button>
<button type="button" onclick="window.history.back()">Atrás</button>
</form>
<script>
// Aquí iría la lógica para procesar el pago con tarjeta
document.getElementById('payment-form').addEventListener('submit', function(event) {
event.preventDefault();
// Aquí se podría agregar la lógica para enviar los detalles del pago a un servidor para procesamiento
alert('¡Pago exitoso! Gracias por tu compra.');
});
</script>
</body>
</html>