-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (114 loc) · 3.37 KB
/
index.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
<!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">
<title>Happy Programmers' Day</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background-color: #f0f2f5;
color: #333;
text-align: center;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-image: url('https://source.unsplash.com/1600x900/?programming,code');
background-size: cover;
background-position: center;
background-attachment: fixed;
}
.container {
max-width: 600px;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
transform: translateY(-50px);
opacity: 0;
transition: transform 0.5s, opacity 0.5s;
}
.container.show {
transform: translateY(0);
opacity: 1;
}
h1 {
font-weight: 700;
font-size: 2em;
margin-bottom: 10px;
color: #e91e63;
}
p {
font-weight: 300;
line-height: 1.5;
margin-bottom: 20px;
}
.blessing-text {
max-height: 0;
overflow: hidden;
transition: max-height 0.5s ease-in-out;
}
.blessing-text.show {
max-height: 500px;
}
.show-button {
padding: 10px 20px;
font-size: 16px;
background-color: #e91e63;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.show-button:hover {
background-color: #d81b60;
}
.blessing-image {
width: 100%;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.date-highlight {
font-weight: 700;
color: #e91e63;
}
.blessing-message {
background-color: #e3f2fd;
padding: 15px;
border-left: 5px solid #e91e63;
border-radius: 5px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<div class="container">
<h1>Happy Programmers' Day!</h1>
<p>Today is <span class="date-highlight">October 24th</span>, a special day for all programmers. Cheers to us!</p>
<p>Special wishes to 大卷子, wishing you success in your studies! </p>
<button class="show-button" onclick="toggleBlessing()">Receive a Special Message</button>
<div class="blessing-text" id="blessing">
<img class="blessing-image" src="https://source.unsplash.com/600x400/?inspiration" alt="Blessing Image">
<div class="blessing-message">
<p>May your code be bug-free and your nights full of rest. Keep pushing forward and never forget to take a moment for yourself. Happy coding!</p>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelector('.container').classList.add('show');
});
function toggleBlessing() {
document.getElementById('blessing').classList.toggle('show');
}
</script>
</body>
</html>