forked from gopinav/Angular-Forms-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton-page.html
More file actions
76 lines (68 loc) · 1.98 KB
/
button-page.html
File metadata and controls
76 lines (68 loc) · 1.98 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button Page</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.container {
text-align: center;
background: white;
padding: 40px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.small-button {
background-color: #007bff;
color: white;
border: none;
padding: 8px 16px;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.small-button:hover {
background-color: #0056b3;
}
.small-button:active {
transform: translateY(1px);
}
h1 {
color: #333;
margin-bottom: 30px;
}
p {
color: #666;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to the Button Page</h1>
<p>Here's your small button:</p>
<button class="small-button" onclick="handleButtonClick()">Click Me!</button>
<p id="message" style="margin-top: 20px; color: #28a745; font-weight: bold;"></p>
</div>
<script>
function handleButtonClick() {
const message = document.getElementById('message');
message.textContent = 'Button clicked! 🎉';
// Hide the message after 2 seconds
setTimeout(() => {
message.textContent = '';
}, 2000);
}
</script>
</body>
</html>