-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuyei.html
205 lines (181 loc) · 6 KB
/
fuyei.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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>我(们)的项目</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html {
height: 100%;
}
body {
height: 100%;
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(135deg, rgb(161, 196, 253), rgb(194, 233, 251));
transition: all 0.3s ease;
}
.project-card {
width: 300px;
background: rgba(255, 255, 255, 0.352);
margin: 10px;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
cursor: pointer;
overflow: hidden;
max-height: 100px;
transition: max-height 0.3s ease, transform 0.3s ease;
/* Add transform transition */
opacity: 0;
}
.fadeIn{
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.project-card:hover {
transform: scale(1.05);
transition: all 0.3s ease;
background: rgba(0,225,225);
}
.additional-info {
display: none;
margin-top: 10px;
border-top: 1px solid #ccc;
transition: all 0.3s ease;
}
.project-card.open {
display: block;
max-height: 700px;
transition: max-height 0.3s ease;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.626);
}
.additional-info {
display: block;
max-height: 500px;
}
.container {
height: 100%;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-content: center;
justify-content: center;
align-items: flex-start;
}
.button {
border-radius: 8px;
padding: 10px 20px;
transition: max-height 0.3s ease;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.626);
color: #87CEEB;
text-decoration: none;
}
.button:hover {
background-color: #f7f7f7;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
.pulse {
animation: pulse 0.5s ease-in-out;
}
body {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
</style>
<title>我的项目</title>
</head>
<body>
<div class="container">
<div class="project-card" onclick="toggleCard(this)">
<h3>设备状态检测</h3>
<p>没什么卵用</p>
<div class="additional-info">
<p>开发者:我自己</p>
<a class="button" href="https://kjmjh.github.io/shebeijiance.html">项目链接</a>
</div>
</div>
<div class="project-card" onclick="toggleCard(this)">
<h3>测试项目</h3>
<p>只做出了加载图标</p>
<div class="additional-info">
<p>开发者:我自己</p>
<a class="button" href="http://kjmjh.github.io/xm2.html">项目链接</a>
</div>
</div>
<div class="project-card" onclick="toggleCard(this)">
<h3>天云系统</h3>
<p>新版上线啦!</p>
<div class="additional-info">
<p>开发者:我自己</p>
<a class="button" href="http://kjmjh.github.io/tysystem">项目链接</a>
</div>
</div>
<div class="project-card" onclick="toggleCard(this)">
<h3>图骗</h3>
<p>好康的</p>
<div class="additional-info">
<p>开发者:我自己、lingbopro</p>
<a class="button" href="http://github.com/kjmjh/TOT">在github中查看</a>
</div>
</div>
</div>
<!-- 添加更多项目卡片 -->
<script>
function toggleCard(card) {
document.querySelectorAll('.project-card').forEach(function (card) {
if (card !== this) {
card.classList.remove('open');
}
}, card);
card.classList.toggle('open');
}
document.addEventListener('DOMContentLoaded', function () {
const projectCards = document.querySelectorAll('.project-card');
var i = 1;
projectCards.forEach((card) => {
setTimeout(function () {
card.classList.add('fadeIn');
card.style.opacity = 1;
}, i * 100);
// Set initial transition delay for staggered effect during page load
card.style.transitionDelay = `${Math.random() * 0.5}s`;
// Add event listeners for hover and click
card.addEventListener('mouseenter', function () {
card.style.transitionDelay = '0s'; // Remove transition delay on hover
card.style.transform = 'scale(1.05)';
});
card.addEventListener('mouseleave', function () {
card.style.transitionDelay = `0s`; // Restore staggered effect on mouse leave
card.style.transform = 'scale(1)';
});
card.addEventListener('click', function () {
card.style.transitionDelay = '0s'; // Remove transition delay on click
});
i += 1;
});
});
</script>
</body>
</html>