-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path个人简历.html
975 lines (870 loc) · 32.1 KB
/
个人简历.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
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人简历 - 颜名赫的个人网站</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', sans-serif;
line-height: 1.6;
background-color: #f5f5f5;
color: #2c3e50;
}
.header {
background-color: #2c3e50;
color: white;
text-align: center;
padding: 2rem 1rem;
margin-bottom: 2rem;
}
.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 2rem;
}
.resume-section {
background: white;
border-radius: 10px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.section-title {
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 0.5rem;
margin-bottom: 1.5rem;
display: flex;
align-items: center;
}
.section-title i {
margin-right: 0.5rem;
color: #3498db;
}
.skill-tags {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin: 1rem 0;
position: relative;
}
.skill-tag {
background: #3498db;
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
}
.achievement-item {
margin-bottom: 1.2rem;
padding-left: 1.8rem;
position: relative;
transition: all 0.3s ease;
}
.achievement-item::before {
content: "🏆";
position: absolute;
left: 0;
color: #3498db;
font-size: 1.1em;
}
.achievement-item:hover {
transform: translateX(5px);
color: #2980b9;
}
.info-item {
margin: 1rem 0;
}
.info-item p {
margin-bottom: 0.8rem;
}
.info-item ul li {
margin-bottom: 0.5rem;
color: #2c3e50;
}
.back-button {
display: inline-block;
margin: 2rem 0;
padding: 0.8rem 1.5rem;
background-color: #3498db;
color: white;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.back-button:hover {
background-color: #2980b9;
}
@media (max-width: 768px) {
.container {
padding: 0 1rem;
}
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.6);
z-index: 1000;
overflow-y: auto;
}
.modal-content {
position: relative;
background: white;
margin: 20px auto;
padding: 25px;
width: 90%;
max-width: 500px;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
#modalTitle {
font-size: 1.3rem;
color: #2c3e50;
margin-bottom: 20px;
padding-right: 30px;
line-height: 1.4;
}
#modalContent {
font-size: 0.95rem;
line-height: 1.6;
}
#modalContent ul {
padding-left: 15px;
}
#modalContent li {
margin-bottom: 15px;
background: rgba(52, 152, 219, 0.05);
padding: 15px;
border-radius: 8px;
border-left: 3px solid #3498db;
}
.detail-text {
margin-top: 8px;
padding-left: 15px;
color: #666;
font-size: 0.9rem;
}
.close-button {
position: absolute;
right: 15px;
top: 15px;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
font-size: 24px;
color: #666;
cursor: pointer;
border-radius: 50%;
background: #f5f5f5;
transition: all 0.3s ease;
}
.close-button:hover {
background: #e0e0e0;
color: #333;
}
@media (max-width: 768px) {
.modal-content {
margin: 10px auto;
padding: 20px;
width: 95%;
}
#modalTitle {
font-size: 1.2rem;
margin-bottom: 15px;
}
#modalContent {
font-size: 0.9rem;
}
.detail-text {
font-size: 0.85rem;
}
#modalContent li {
padding: 12px;
margin-bottom: 12px;
}
.close-button {
right: 10px;
top: 10px;
width: 25px;
height: 25px;
line-height: 25px;
font-size: 20px;
}
}
@media (max-width: 320px) {
.modal-content {
padding: 15px;
}
#modalContent {
font-size: 0.85rem;
}
.detail-text {
font-size: 0.8rem;
padding-left: 10px;
}
}
.skill-tag {
background: linear-gradient(135deg, #3498db, #2980b9);
color: white;
padding: 0.7rem 1.2rem;
border-radius: 25px;
font-size: 0.95rem;
letter-spacing: 0.5px;
box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
}
.skill-tag:hover {
transform: translateY(-3px) scale(1.05);
box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
background: linear-gradient(135deg, #2980b9, #3498db);
}
.close-button {
position: absolute;
right: 20px;
top: 20px;
width: 35px;
height: 35px;
background: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
z-index: 2;
}
.close-button:hover {
background-color: #e74c3c;
color: white;
transform: rotate(90deg);
box-shadow: 0 2px 15px rgba(231, 76, 60, 0.3);
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes shimmer {
0% {
background-position: -100% 0;
}
100% {
background-position: 100% 0;
}
}
.detail-text {
font-size: 0.9em;
color: #666;
margin-left: 20px;
margin-top: 5px;
padding-left: 15px;
border-left: 2px solid #e8e8e8;
transition: all 0.3s ease;
}
#modalContent li {
background: rgba(255, 255, 255, 0.7);
border-radius: 8px;
margin-bottom: 25px;
padding: 15px 20px 15px 35px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
border-left: 3px solid transparent;
transition: all 0.3s ease;
}
#modalContent li:hover {
background: rgba(52, 152, 219, 0.08);
border-left: 3px solid #3498db;
transform: translateX(5px);
}
#modalContent li:hover .detail-text {
border-left-color: #3498db;
color: #444;
}
#modalContent li:before {
content: "🔓";
position: absolute;
left: 10px;
top: 15px;
color: #3498db;
font-size: 1.1em;
}
#modalTitle {
font-size: 1.6em;
color: #2c3e50;
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 2px solid #3498db;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.experience-item {
margin-bottom: 2rem;
padding: 1.5rem;
background: rgba(255, 255, 255, 0.8);
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: all 0.3s ease;
border-left: 3px solid transparent;
}
.experience-item:hover {
transform: translateX(5px);
border-left: 3px solid #3498db;
box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}
.experience-item h3 {
color: #2c3e50;
margin-bottom: 1rem;
font-size: 1.2em;
display: flex;
align-items: center;
}
.experience-item h3::before {
content: "🏢";
margin-right: 10px;
font-size: 1.1em;
}
.experience-item .detail-text {
color: #666;
margin-left: 2rem;
padding-left: 1rem;
border-left: 2px solid #e8e8e8;
transition: all 0.3s ease;
}
.experience-item:hover .detail-text {
border-left-color: #3498db;
color: #444;
}
.social-links {
margin-top: 1rem;
padding-left: 1rem;
}
.social-item {
display: flex;
align-items: center;
margin-bottom: 0.8rem;
padding: 0.5rem 1rem;
background: rgba(52, 152, 219, 0.05);
border-radius: 8px;
transition: all 0.3s ease;
}
.social-item:hover {
background: rgba(52, 152, 219, 0.1);
transform: translateX(5px);
}
.social-item i {
margin-right: 0.8rem;
color: #3498db;
font-size: 1.2em;
}
.social-item a {
color: #3498db;
text-decoration: none;
margin-right: 0.5rem;
transition: color 0.3s ease;
}
.social-item a:hover {
color: #2980b9;
text-decoration: underline;
}
.badge {
background: #3498db;
color: white;
padding: 0.2rem 0.6rem;
border-radius: 12px;
font-size: 0.8em;
margin-left: 0.5rem;
}
.highlight {
color: #2c3e50;
font-weight: 500;
}
.qrcode-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0);
z-index: 1100;
transition: background-color 0.3s ease;
}
.qrcode-modal.show {
background-color: rgba(0,0,0,0.6);
}
.qrcode-content {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.9);
background: white;
padding: 20px;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
opacity: 0;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.qrcode-modal.show .qrcode-content {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
.qrcode-image {
max-width: 300px;
border-radius: 10px;
}
.qrcode-title {
text-align: center;
margin-bottom: 15px;
color: #2c3e50;
font-size: 1.2em;
}
.detail-hint {
display: inline-block;
color: #95a5a6;
font-size: 0.75em;
margin-left: 10px;
font-weight: normal;
opacity: 0.8;
font-style: italic;
}
.detail-hint i {
margin-right: 4px;
font-size: 0.9em;
}
.skill-tags::after {
content: '点击标签查看详细经验';
position: absolute;
right: 0;
bottom: -20px;
font-size: 0.75em;
color: #95a5a6;
font-style: italic;
}
@media (max-width: 768px) {
.detail-hint {
display: inline-flex;
margin-top: 8px;
font-size: 0.8em;
}
}
</style>
</head>
<body>
<header class="header">
<h1>个人简历</h1>
</header>
<div class="container">
<section class="resume-section">
<h2 class="section-title">
<i class="fas fa-user"></i>基本信息
</h2>
<div class="info-item">
<p><strong>学校:</strong>兰州大学(985)</p>
<p><strong>社交平台:</strong></p>
<div class="social-links">
<div class="social-item">
<i class="fab fa-blogger"></i>
CSDN:<a href="https://blog.csdn.net/yanminghe66666" target="_blank">Dexter(.*?)</a>
<span class="badge">1000+ 粉丝</span>
</div>
<div class="social-item">
<i class="fas fa-globe"></i>
知识星球:<a href="https://wx.zsxq.com/group/28888285155241" target="_blank">dexter</a>
</div>
<div class="social-item">
<i class="fab fa-weixin"></i>
微信公众号:<a class="highlight" onclick="showQRCode()" style="cursor: pointer;">我真的不是蜘蛛</a>
</div>
</div>
</div>
</section>
<section class="resume-section">
<h2 class="section-title">
<i class="fas fa-laptop-code"></i>专业技能与项目经验
<span class="detail-hint">
<i class="fas fa-hand-pointer"></i>
点击下方标签查看
</span>
</h2>
<div class="skill-tags">
<span class="skill-tag" onclick="showModal('js-reverse')">JavaScript逆向</span>
<span class="skill-tag" onclick="showModal('web-crawler')">网络爬虫</span>
<span class="skill-tag" onclick="showModal('web-design')">网页设计</span>
<span class="skill-tag" onclick="showModal('data-analysis')">数据分析和机器学习</span>
</div>
</section>
<section class="resume-section">
<h2 class="section-title">
<i class="fas fa-trophy"></i>获奖经历
</h2>
<div class="achievement-item">
高教社杯数学建模竞赛省一等奖(A类)
</div>
<div class="achievement-item">
全国易班技术创新大赛 国家三等奖
</div>
<div class="achievement-item">
"华数杯"数学建模国家优秀奖
</div>
<div class="achievement-item">
全国互联网+大学生创新创业大赛 校级铜奖
</div>
<div class="achievement-item">
信息科技之信息安全竞赛 二等奖
</div>
<div class="achievement-item">
校优秀学生三等奖学金
</div>
</section>
<section class="resume-section">
<h2 class="section-title">
<i class="fas fa-briefcase"></i>社团经历
</h2>
<div class="experience-item">
<h3>萃英在线网络技术部</h3>
<div class="detail-text">
• 参与校园网站开发和维护工作
• 负责技术部门的日常项目开发
• 参与技术分享和团队协作
</div>
</div>
<div class="experience-item">
<h3>易班应用开发工作室</h3>
<div class="detail-text">
• 参与兰大小萃APP的开发维护
• 负责AI+思政平台的开发工作
• 完成多个校园应用的开发任务
</div>
</div>
<div class="experience-item">
<h3>兰州大学西北开源社区</h3>
<div class="detail-text">
• 参与维护西北最大镜像站
• 参与开源项目开发和维护
• 组织技术交流活动
</div>
</div>
</section>
<a href="index.html" class="back-button">
<i class="fas fa-arrow-left"></i> 返回首页
</a>
</div>
<!-- 模态框 -->
<div id="skillModal" class="modal">
<div class="modal-content">
<span class="close-button" onclick="closeModal()">×</span>
<h3 id="modalTitle"></h3>
<div id="modalContent"></div>
</div>
</div>
<!-- 微信公众号二维码模态框 -->
<div id="qrcodeModal" class="qrcode-modal" onclick="closeQRCode()">
<div class="qrcode-content" onclick="event.stopPropagation()">
<div class="qrcode-title">扫码关注公众号</div>
<img src="微信公众号.jpg" alt="微信公众号二维码" class="qrcode-image">
</div>
</div>
<script>
const skillDetails = {
'js-reverse': {
title: 'JavaScript逆向项目经验',
content: `
<ul>
<li>破解极验滑块验证码第四代,实现逆向验证通过
<div class="detail-text">
• 分析 webpack加密过程和加密数生成
• 还原 w 参数的迹加密算法
• opencv算出缺口位置
</div>
</li>
<li>突破加速乐 __jsl_clearance_s cookie 生成算法
<div class="detail-text">
• 还原 VM 虚拟机保护的 JavaScript 码
• 模拟执行动态生成的混淆代码
• 自动化获取访问令牌__jsl_clearance_s
</div>
</li>
<li>破解阿里系 acw_sc__v2 参数生成逻辑
<div class="detail-text">
• 还原签名算法和环境检测逻辑
• 实现纯 JavaScript 的参数生成
</div>
</li>
<li>攻克抖音 X-Bogus、a_bogus等签名
<div class="detail-text">
• 逆向加密算法
• 实现 Node.js 接口服务
</div>
</li>
<li>破某某 x-s加密
<div class="detail-text">
• 分析 AST 混淆代码的执行流程
• 还原加密参数的生成逻辑
</div>
</li>
</ul>
`
},
'web-crawler': {
title: '网络爬虫项目经验',
content: `
<ul>
<li>自动化工具与框架应用
<div class="detail-text">
• 熟练使用 Playwright、DrissionPage、Selenium 等自动化工具
• 基于 Scrapy 框架开发分布式爬虫系统
• 使用 RPC 技术实现快速请求
• 使用 celery 实现分布式任务调度
</div>
</li>
<li>反爬技术攻克
<div class="detail-text">
• 解决字体反爬,参数加密等反爬措施
• 使用 Hook 技术拦截和修改 JavaScript 执行
• 熟练使用 Charles、Fiddler、Reqable等抓取工具
</div>
</li>
<li>性能优化与并发控制
<div class="detail-text">
• 实现多线程、多进程、协程等并发爬虫
• 设计 IP 代理池自动切换机制
• 使用redis去重和任务调度
</div>
</li>
<li>环境模拟与请求伪装
<div class="detail-text">
• 补充浏览器环境,模拟真实请求环境
• 还原 Webpack 打包的加密模块
</div>
</li>
<li>特殊平台数据采集
<div class="detail-text">
• 微信公众号文章批量采集
• 各类验证码的识别与绕过
</div>
</li>
</ul>
`
},
'web-design': {
title: '网页设计与全栈开发经验',
content: `
<ul>
<li>兰大小萃 APP 开发维护
<div class="detail-text">
• 使用 uni-app 开发跨平台移动应用
• 基于 Django 构建后端服务架构
• 负责用户界面优化和交互设计
• 实现响应式布局适配多端显示
</div>
</li>
<li>AI+ 思政平台开发
<div class="detail-text">
• 基于 RGA 模型开发情感疏解模块
• 设计实现图说文化展示功能
• 负责数据接口开发和性能优化
• 完成前端界面美化和交互优化
</div>
</li>
<li>全栈开发技术栈
<div class="detail-text">
• 前端:Vue.js、uni-app、HTML5/CSS3
• 后端:Django、Flask
• 数据库设计和性能优化
• 前后端分离架构实践
</div>
</li>
<li>UI/UX 设计能力
<div class="detail-text">
• 设计直观友好的用户界面
• 优化用户交互体验
• 实现流畅的动画效果
• 注重节和用户反馈
</div>
</li>
<li>项目管理与协作
<div class="detail-text">
• 参与需求分析和功能设计
• 使用 git 进行代码版本控制和团队协作
• 项目文档编写和维护
• 性能监控和问题排查
</div>
</li>
</ul>
`
},
'data-analysis': {
title: '数据分析与机器学习经验',
content: `
<ul>
<li>数学建模竞赛成果
<div class="detail-text">
• 高教社杯数学建模竞赛省一等奖(A类)
• 多次获得数学建模省级和国家级奖项
• 掌握数据预处理和特征工程技术
• 熟练使用 spss、Python 等建模工具
</div>
</li>
<li>机器学习算法应用
<div class="detail-text">
• 掌握机器学习算法(SVM、决策树、随机森林等)
• 了解无监督学习方法(聚类、降维)
• 具备模型评估和优化能力
</div>
</li>
<li>数据分析与可视化
<div class="detail-text">
• 使用 Pandas、NumPy 进行数据处理
• 应用 Matplotlib、Seaborn 进行数据可视化
• 统计分析和假设检验
• 时间序列数据分析
</div>
</li>
<li>建模实践经验
<div class="detail-text">
参与多个实际建模项目
• 数据挖掘和预测分析
• 优化算法设计与实现
• 模型部署和性能调优
</div>
</li>
</ul>
`
},
};
function showModal(skillId) {
const modal = document.getElementById('skillModal');
const modalTitle = document.getElementById('modalTitle');
const modalContent = document.getElementById('modalContent');
const content = modal.querySelector('.modal-content');
// 重置所有样式
modal.style.backgroundColor = 'rgba(0,0,0,0)';
content.style.transform = 'translateY(60px) scale(0.95)';
content.style.opacity = '0';
content.style.transition = 'all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)';
modalTitle.textContent = skillDetails[skillId].title;
modalContent.innerHTML = skillDetails[skillId].content;
modal.style.display = 'block';
// 强制重排以确保动画正确播放
void modal.offsetWidth;
requestAnimationFrame(() => {
modal.classList.add('show');
content.style.transform = 'translateY(0) scale(1)';
content.style.opacity = '1';
});
// 为每个列表项添加渐进式动画
const listItems = modalContent.querySelectorAll('li');
listItems.forEach((item, index) => {
item.style.opacity = '0';
item.style.transform = 'translateX(-20px)';
setTimeout(() => {
item.style.transition = 'all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)';
item.style.opacity = '1';
item.style.transform = 'translateX(0)';
}, 100 + index * 100);
});
// 添加事件监听器
modal.addEventListener('mousemove', handleMouseMove);
modal.addEventListener('mouseleave', handleMouseLeave);
}
function closeModal() {
const modal = document.getElementById('skillModal');
const content = modal.querySelector('.modal-content');
// 重置所有变换和过渡效果
content.style.transform = 'translateY(30px) scale(0.95)';
content.style.opacity = '0';
modal.classList.remove('show');
modal.style.backgroundColor = 'rgba(0,0,0,0)';
// 清除所有事件监听器
modal.removeEventListener('mousemove', handleMouseMove);
modal.removeEventListener('mouseleave', handleMouseLeave);
setTimeout(() => {
modal.style.display = 'none';
// 重置内容区域的滚动置
document.getElementById('modalContent').scrollTop = 0;
// 重置变换状态
content.style.transform = 'translateY(60px) scale(0.95)';
// 清除所有内联样式
content.style.transition = '';
}, 400);
}
// 点击模态框外部关闭
window.onclick = function(event) {
const modal = document.getElementById('skillModal');
if (event.target == modal) {
closeModal();
}
}
// 添加 ESC 键关闭功能
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape') {
closeModal();
}
});
function handleMouseMove(e) {
if (this.timeout) {
window.cancelAnimationFrame(this.timeout);
}
this.timeout = window.requestAnimationFrame(() => {
const rect = this.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const xPercent = ((x / rect.width) - 0.5) * 2;
const yPercent = ((y / rect.height) - 0.5) * 2;
const content = this.querySelector('.modal-content');
content.style.transform = `
translateX(${xPercent * 3}px)
translateY(${yPercent * 3}px)
rotateX(${-yPercent * 1}deg)
rotateY(${xPercent * 1}deg)
`;
});
}
function handleMouseLeave() {
const content = this.querySelector('.modal-content');
content.style.transition = 'all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)';
content.style.transform = 'none';
setTimeout(() => {
content.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)';
}, 600);
}
function showQRCode() {
const modal = document.getElementById('qrcodeModal');
modal.style.display = 'block';
requestAnimationFrame(() => {
modal.classList.add('show');
});
}
function closeQRCode() {
const modal = document.getElementById('qrcodeModal');
modal.classList.remove('show');
setTimeout(() => {
modal.style.display = 'none';
}, 300);
}
// 添加 ESC 键关闭二维码功能
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape') {
closeQRCode();
}
});
</script>
</body>
</html>