|
35 | 35 | } |
36 | 36 | body { |
37 | 37 | min-height: 100vh; |
38 | | - background-color: #ffffff; |
| 38 | + background: linear-gradient(135deg, #ffffff 0%, #ffffff 30%, #a5d296 70%, #5ac05c 100%); |
| 39 | + background-size: 400% 400%; |
| 40 | + animation: gradientMove 15s ease infinite; |
39 | 41 | color: #252525; |
40 | 42 | overflow-x: hidden; |
41 | 43 | transition: background-color 0.3s; |
42 | 44 | } |
| 45 | + @keyframes gradientMove { |
| 46 | + 0% { |
| 47 | + background-position: 0% 50%; |
| 48 | + } |
| 49 | + 50% { |
| 50 | + background-position: 100% 50%; |
| 51 | + } |
| 52 | + 100% { |
| 53 | + background-position: 0% 50%; |
| 54 | + } |
| 55 | + } |
43 | 56 | .page { |
44 | 57 | opacity: 0; |
45 | 58 | transform: translateY(20px); |
|
142 | 155 | color: #252525; |
143 | 156 | margin-bottom: 8px; |
144 | 157 | line-height: 1.2; |
| 158 | + text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); |
145 | 159 | } |
146 | 160 | .home-subtitle { |
147 | 161 | font-size: 1.5rem; |
148 | | - color: #a5d296; |
| 162 | + color: #5ac05c; |
149 | 163 | font-weight: 500; |
| 164 | + text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); |
150 | 165 | } |
151 | 166 | .announcements-container { |
152 | 167 | display: flex; |
|
209 | 224 | text-align: center; |
210 | 225 | color: #252525; |
211 | 226 | margin-bottom: 48px; |
| 227 | + text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); |
212 | 228 | } |
213 | 229 | .works-page, .contact-page, .collaboration-page, .service-page { |
214 | 230 | padding-top: 72px; |
|
528 | 544 | .copy-notification.show { |
529 | 545 | opacity: 1; |
530 | 546 | } |
| 547 | + |
| 548 | + /* 动态渐变背景的额外样式 */ |
| 549 | + .dynamic-background { |
| 550 | + position: fixed; |
| 551 | + top: 0; |
| 552 | + left: 0; |
| 553 | + width: 100%; |
| 554 | + height: 100%; |
| 555 | + z-index: -1; |
| 556 | + opacity: 0.8; |
| 557 | + } |
| 558 | + |
| 559 | + .gradient-blob { |
| 560 | + position: absolute; |
| 561 | + border-radius: 50%; |
| 562 | + filter: blur(60px); |
| 563 | + opacity: 0.5; |
| 564 | + } |
| 565 | + |
| 566 | + .blob-1 { |
| 567 | + width: 300px; |
| 568 | + height: 300px; |
| 569 | + background: linear-gradient(135deg, #a5d296 0%, #5ac05c 100%); |
| 570 | + top: 10%; |
| 571 | + left: 10%; |
| 572 | + animation: float 25s ease-in-out infinite; |
| 573 | + } |
| 574 | + |
| 575 | + .blob-2 { |
| 576 | + width: 250px; |
| 577 | + height: 250px; |
| 578 | + background: linear-gradient(135deg, #5ac05c 0%, #ffffff 100%); |
| 579 | + top: 60%; |
| 580 | + right: 15%; |
| 581 | + animation: float 30s ease-in-out infinite reverse; |
| 582 | + } |
| 583 | + |
| 584 | + .blob-3 { |
| 585 | + width: 200px; |
| 586 | + height: 200px; |
| 587 | + background: linear-gradient(135deg, #ffffff 0%, #a5d296 100%); |
| 588 | + bottom: 20%; |
| 589 | + left: 20%; |
| 590 | + animation: float 35s ease-in-out infinite; |
| 591 | + } |
| 592 | + |
| 593 | + @keyframes float { |
| 594 | + 0%, 100% { |
| 595 | + transform: translate(0, 0) scale(1); |
| 596 | + } |
| 597 | + 25% { |
| 598 | + transform: translate(30px, 50px) scale(1.1); |
| 599 | + } |
| 600 | + 50% { |
| 601 | + transform: translate(-20px, 30px) scale(0.9); |
| 602 | + } |
| 603 | + 75% { |
| 604 | + transform: translate(40px, -20px) scale(1.05); |
| 605 | + } |
| 606 | + } |
531 | 607 | </style> |
532 | 608 | </head> |
533 | 609 |
|
534 | 610 | <body> |
| 611 | + <!-- 动态渐变背景 --> |
| 612 | + <div class="dynamic-background"> |
| 613 | + <div class="gradient-blob blob-1"></div> |
| 614 | + <div class="gradient-blob blob-2"></div> |
| 615 | + <div class="gradient-blob blob-3"></div> |
| 616 | + </div> |
| 617 | + |
535 | 618 | <nav class="sticky-nav"> |
536 | 619 | <div class="nav-container"> |
537 | 620 | <div class="nav-content"> |
@@ -664,11 +747,11 @@ <h3 class="card-title">积木扩展</h3> |
664 | 747 | </li> |
665 | 748 | <li class="card-list-item"> |
666 | 749 | <span class="card-list-bullet"></span> |
667 | | - 下载指定文件 |
| 750 | + 文件下载 |
668 | 751 | </li> |
669 | 752 | <li class="card-list-item"> |
670 | 753 | <span class="card-list-bullet"></span> |
671 | | - 跳转至站外网页 |
| 754 | + 网页跳转 |
672 | 755 | </li> |
673 | 756 | <li class="card-list-item"> |
674 | 757 | <span class="card-list-bullet"></span> |
@@ -758,10 +841,10 @@ <h3 class="card-title">慕然科技的Scratch积木扩展开发教程</h3> |
758 | 841 | <div class="card-icon"> |
759 | 842 | <div class="card-dot"></div> |
760 | 843 | </div> |
761 | | - <h3 class="card-title">慕然科技Scratch积木扩展库</h3> |
| 844 | + <h3 class="card-title">慕然科技官方文库</h3> |
762 | 845 | </div> |
763 | | - <p class="card-note">丰富、实用的开源积木扩展</p> |
764 | | - <a href="https://ccwmoran.github.io/code/" target="_blank" class="service-btn encode-btn external-link" style="display: block; text-align: center; margin-top: 16px;">访问代码库</a> |
| 846 | + <p class="card-note">官方文档和资源库</p> |
| 847 | + <a href="https://kejicx.github.io/doc/" target="_blank" class="service-btn encode-btn external-link" style="display: block; text-align: center; margin-top: 16px;">访问文库</a> |
765 | 848 | </div> |
766 | 849 | </div> |
767 | 850 | </div> |
@@ -986,6 +1069,47 @@ <h3 class="modal-title">跳转确认</h3> |
986 | 1069 | randomEmoji.style.marginLeft = '8px'; |
987 | 1070 | randomEmoji.style.display = 'inline-block'; |
988 | 1071 |
|
| 1072 | + // 动态生成随机渐变背景 |
| 1073 | + function generateRandomGradient() { |
| 1074 | + const colors = ['#ffffff', '#a5d296', '#5ac05c']; |
| 1075 | + const gradientTypes = ['linear-gradient', 'radial-gradient']; |
| 1076 | + const gradientType = gradientTypes[Math.floor(Math.random() * gradientTypes.length)]; |
| 1077 | + |
| 1078 | + let gradientString; |
| 1079 | + if (gradientType === 'linear-gradient') { |
| 1080 | + const angle = Math.floor(Math.random() * 360); |
| 1081 | + const color1 = colors[Math.floor(Math.random() * colors.length)]; |
| 1082 | + const color2 = colors[Math.floor(Math.random() * colors.length)]; |
| 1083 | + const color3 = colors[Math.floor(Math.random() * colors.length)]; |
| 1084 | + gradientString = `${gradientType}(${angle}deg, ${color1} 0%, ${color2} 50%, ${color3} 100%)`; |
| 1085 | + } else { |
| 1086 | + const shape = Math.random() > 0.5 ? 'circle' : 'ellipse'; |
| 1087 | + const color1 = colors[Math.floor(Math.random() * colors.length)]; |
| 1088 | + const color2 = colors[Math.floor(Math.random() * colors.length)]; |
| 1089 | + gradientString = `${gradientType}(${shape} at ${Math.floor(Math.random() * 100)}% ${Math.floor(Math.random() * 100)}%, ${color1} 0%, ${color2} 100%)`; |
| 1090 | + } |
| 1091 | + |
| 1092 | + return gradientString; |
| 1093 | + } |
| 1094 | + |
| 1095 | + // 应用随机渐变背景 |
| 1096 | + const dynamicBackground = document.querySelector('.dynamic-background'); |
| 1097 | + if (dynamicBackground) { |
| 1098 | + // 随机调整渐变斑点的位置和大小 |
| 1099 | + const blobs = document.querySelectorAll('.gradient-blob'); |
| 1100 | + blobs.forEach(blob => { |
| 1101 | + const size = Math.floor(Math.random() * 200) + 150; |
| 1102 | + blob.style.width = `${size}px`; |
| 1103 | + blob.style.height = `${size}px`; |
| 1104 | + blob.style.top = `${Math.floor(Math.random() * 80)}%`; |
| 1105 | + blob.style.left = `${Math.floor(Math.random() * 80)}%`; |
| 1106 | + |
| 1107 | + // 随机动画持续时间 |
| 1108 | + const duration = Math.floor(Math.random() * 20) + 20; |
| 1109 | + blob.style.animationDuration = `${duration}s`; |
| 1110 | + }); |
| 1111 | + } |
| 1112 | + |
989 | 1113 | // 初始页面显示 |
990 | 1114 | setTimeout(() => { |
991 | 1115 | document.querySelector('.page.active').classList.add('active'); |
|
0 commit comments