-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
445 lines (415 loc) · 16 KB
/
Copy pathindex.html
File metadata and controls
445 lines (415 loc) · 16 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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人介绍</title>
<style>
/* 定义第一个字体样式 */
@font-face {
font-family: "ZCOOLKuaile";
src: url("站酷仓耳渔阳体 W05.ttf") format("truetype");
}
/* 定义第二个字体样式 */
@font-face {
font-family: "YSHAOSHENTI";
src: url("YSHAOSHENTI-2.TTF") format("truetype");
}
body {
font-family: Arial, sans-serif;
background-color: #f3f3f3;
margin: 0;
padding: 0;
}
.hero {
position: relative;
height: 600px;
background-image: url(个人介绍-img/background.jpg);
background-size: cover;
background-position: center;
margin-bottom: 60px;
}
.hero-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 40px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 6px;
}
h1 {
color: #333;
text-align: center;
margin-bottom: 20px;
font-size: 80px;
font-family: "ZCOOLKuaile", sans-serif;
}
p {
color: #666;
line-height: 1.6;
margin-bottom: 15px;
font-family: "YSHAOSHENTI", sans-serif;
}
.profile-image {
display: block;
margin: 0 auto;
width: 250px;
height: 250px;
border-radius: 50%;
object-fit: cover;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
margin-bottom: 10px;
font-family: "YSHAOSHENTI", sans-serif;
}
.contact-info {
margin-top: 30px;
}
.contact-info li {
display: inline-block;
margin-right: 10px;
}
.contact-info li a {
color: #333;
text-decoration: none;
transition: color 0.3s ease;
}
.contact-info li a:hover {
color: #007bff;
}
h3 {
color: #333;
text-align: center;
margin-bottom: 20px;
font-size: 30px;
font-family: "ZCOOLKuaile", sans-serif;
}
h2 {
color: #333;
text-align: center;
margin-bottom: 20px;
font-size: 60px;
font-family: "ZCOOLKuaile", sans-serif;
}
.bar-chart-container {
display: flex;
align-items: center;
}
.category-label {
margin-right: 10px;
font-weight: bold;
}
.bar-chart {
width: 0;
height: 20px;
background-color: #007bff; /* 条形图的颜色 */
transition: width 1s ease; /* 过渡动画效果,持续1秒 */
}
span{
color: #333;
text-align: left;
margin-bottom: 0px;
font-size: 20px;
font-family: "YSHAOSHENTI", sans-serif;
}
.font-size-1 {
font-size: 35px;
color: #000;
}
.color-area {
max-width: 800px;
margin: 0 auto;
padding: 40px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 6px;
}
.work {
margin-bottom: 40px;
padding: 20px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 6px;
}
.work img {
max-width: 250px; /* 控制图片的宽度 */
height: auto;
border-radius: 6px;
display: block; /* 让图片成为块级元素,以独占一行 */
margin: 0 auto 20px; /* 将图片居中显示,并增加图片和描述之间的垂直间距 */
}
.work h3 {
color: #333;
font-size: 24px;
margin: 0;
font-family: "YSHAOSHENTI", sans-serif;
text-align: center; /* 让标题居中显示 */
}
.work p {
color: #666;
font-size: 16px;
margin: 0;
font-family: "YSHAOSHENTI", sans-serif;
text-align: center; /* 让描述居中显示 */
}
.work a {
display: block; /* 让按钮成为块级元素,以独占一行 */
margin: 0 auto; /* 将按钮居中显示 */
padding: 10px 20px;
background-color: #F08080;
color: #fff;
text-decoration: none;
border-radius: 6px;
font-family: "YSHAOSHENTI", sans-serif;
transition: background-color 0.3s ease;
text-align: center; /* 让按钮居中显示 */
}
.work a:hover {
background-color: #ff4d4d;
}
/* 添加按钮的默认样式 */
.more-button {
display: block;
margin: 0 auto;
padding: 10px 20px;
background-color: #5baaff; /* 默认颜色 */
color: #fff;
text-decoration: none;
border-radius: 6px;
font-family: "YSHAOSHENTI", sans-serif;
transition: background-color 0.3s ease;
text-align: center;
}
/* 添加按钮的悬停样式 */
.more-button:hover {
background-color: #007bff; /* 悬停时的深蓝色 */
}
.tab-links {
display: flex;
justify-content: center;
list-style: none;
margin: 0;
padding: 0;
width: 100%;
background-color: #fff;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
position: relative;
z-index: 100; /* 提高层叠上下文级别 */
}
.tab-links li {
flex: 1;
text-align: center;
padding: 10px 0;
margin: 0;
cursor: pointer;
transition: background-color 0.3s ease;
position: relative; /* 确保能够正确响应点击 */
z-index: 1; /* 确保没有其他元素覆盖 */
}
/* Adjusted hover and active states for better visual feedback */
.tab-links li:hover{
background-color: #d1e7ff;
color: #007bff;
border-bottom: 3px solid #007bff; /* Make it slightly thicker for visibility */
}
.tab-links li.active {
background-color: #9dccff;
color: #007bff;
border-bottom: 3px solid #007bff; /* Make it slightly thicker for visibility */
}
/* Ensure that tab content areas are correctly shown */
.tab-content {
display: none;
opacity: 0;
transition: opacity 0.5s;
}
.tab-content.active {
display: block;
opacity: 1;
transition: opacity 0.5s;
}
.image-gallery {
display: flex;
flex-wrap: wrap;
justify-content: space-between; /* 确保间距一致 */
padding: 15px 0; /* 上下留出一些空间 */
}
.gallery-item {
width: calc(25% - 10px); /* 计算宽度,留出间隙 */
margin-bottom: 20px; /* 底部间隙 */
}
.gallery-item img {
width: 100%; /* 图片宽度充满容器 */
height: auto; /* 自动调整图片高度 */
aspect-ratio: 1 / 1; /* 保持图片为正方形 */
object-fit: cover; /* 裁剪图片以填充容器 */
}
</style>
</head>
<body>
<div class="hero">
<ul class="tab-links">
<li data-target=".personal-introduction">个人介绍</li>
<li data-target=".skills-chart">能力对比图</li>
<li data-target=".contact-info">联系方式</li>
<li data-target=".portfolio">作品集</li>
</ul>
<!-- Personal Introduction -->
<div class="tab-content personal-introduction active">
<div class="hero-content">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h1>个人介绍</h1>
<img class="profile-image" src="个人介绍-img/cute_cat.png" alt="Profile Image">
<h3>你好,我是Sharon。</h3>
<p class="font-size-1">数据更新:2024.1.25</p>
<div class="color-area" style="background-color: #ffd9df;">
<p>你好!我是Sharon,也叫iceSharon。截至更新日期,今年11岁。</p>
<p>我的爱好是编程、设计、游戏引擎和AI。</p>
<p>请多指教。</p>
</div>
</div>
</div>
<!-- Skills Chart -->
<div class="tab-content skills-chart">
<br><br><br><br>
<div class="color-area" style="background-color: #E6E6FA;">
<p class="font-size-1">我的技能自我评价能力对比图</p>
<p>(【自我评价】仅为自我评价,可能与事实有出入;【对比图】长度只为了对比,而不是具体数值)</p>
<span class="category-label">Scratch:</span><div class="bar-chart" data-width="60%" style="background-color: #007bff;"></div>
<span class="category-label">3D建模设计:</span><div class="bar-chart" data-width="50%" style="background-color: #007bff;"></div>
<span class="category-label">C++:</span><div class="bar-chart" data-width="35%" style="background-color: #007bff;"></div>
<span class="category-label">Processing:</span><div class="bar-chart" data-width="30%" style="background-color: #007bff;"></div>
<span class="category-label">HTML、CSS、JavaScript:</span><div class="bar-chart" data-width="15%" style="background-color: #007bff;"></div>
<span class="category-label">Python:</span><div class="bar-chart" data-width="10%" style="background-color: #007bff;"></div>
<span class="category-label">Unreal Engine:</span><div class="bar-chart" data-width="5%" style="background-color: #007bff;"></div>
</div>
</div>
<!-- Contact Information -->
<div class="tab-content contact-info">
<div class="color-area" style="background-color: #cdf3ff;">
<p class="font-size-1">联系方式</p>
<div class="contact-info">
<ul>
<li>Email:<a href="mailto:iamicesharon@163.com">iamicesharon@163.com</a></li>
</ul>
</div>
</div>
</div>
<!-- Portfolio -->
<div class="tab-content portfolio">
<br>
<div class="color-area" style="background-color: #ffb7b7;">
<h2>作品集</h2>
<!--
这是一个作品集显示代码,请不要修改。
<div class="work">
<h3>作品标题 1</h3>
<div class="work-content">
<img src="个人介绍-img/cute_cat.png" alt="Work 1">
<p>作品描述 1</p>
</div>
<a href="#" target="_blank">查看作品</a>
</div>
-->
<p>(新版网页将游戏放入作品集的游戏部分,UI没有更改)</p>
<a href="pages/作品集/目录.html" target="_blank" class="more-button">前往作品集</a>
</div>
<div class="color-area" style="background-color: #ffb7b7;">
<h3>这些是我的游戏的缩略图,点击可以跳转,目前只增加了一个游戏</h3>
<div class="image-gallery">
<!-- 示例图片,点击后跳转 -->
<div class="gallery-item">
<a href="pages/游戏/贪吃蛇游戏/贪吃蛇游戏.html">
<img src="pages/作品集/游戏系列-img/贪吃蛇游戏.png" alt="贪吃蛇游戏">
</a>
</div>
<!--
<div class="gallery-item">
<a href="目标页面URL2">
<img src="image2.jpg" alt="Image 2">
</a>
</div>
<div class="gallery-item">
<a href="目标页面URL3">
<img src="image3.jpg" alt="Image 3">
</a>
</div>
<div class="gallery-item">
<a href="目标页面URL4">
<img src="image4.jpg" alt="Image 4">
</a>
</div>
-->
<!-- 可以继续添加更多图片 -->
</div>
</div>
</div>
<!--
这是之前没有划分的、整体的代码,请不要修改。
<div class="container">
<br>
<br>
<canvas class="wave-xp" style="position: fixed; bottom: 0; left: 0; z-index: -1;"></canvas>
</div>
-->
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.tab-links li').forEach(tab => {
tab.addEventListener('click', function() {
let targetSection = this.getAttribute('data-target');
document.querySelectorAll('.tab-links li').forEach(tab => {
tab.classList.remove('active');
});
document.querySelectorAll('.tab-content').forEach(section => {
section.classList.remove('active');
section.style.opacity = "0"; // Reset opacity for animation
});
// Activate clicked tab and corresponding section with animation
this.classList.add('active');
const activeSection = document.querySelector(targetSection);
activeSection.classList.add('active');
setTimeout(() => activeSection.style.opacity = "1", 100); // Fade-in animation
if (targetSection === '.skills-chart') {
triggerBarChartAnimations();
}
});
const personalIntroductionTab = document.querySelector('li[data-target=".personal-introduction"]');
personalIntroductionTab.classList.add('active');
});
function triggerBarChartAnimations() {
const barCharts = document.querySelectorAll('.skills-chart .bar-chart');
barCharts.forEach(barChart => {
setTimeout(() => {
barChart.style.width = barChart.getAttribute('data-width');
}, 100);
});
}
// Function to check if an element is in the viewport
// Might be useful for additional animations or scroll-triggered events
function isInViewport(element) {
const rect = element.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
});
</script>
</body>
</html>