|
93 | 93 | .screenshots { padding: 100px 2rem; overflow: hidden; } |
94 | 94 | .screenshots h2 { text-align: center; font-size: 2rem; margin-bottom: 3rem; } |
95 | 95 | .carousel { |
96 | | - position: relative; height: 520px; perspective: 1200px; |
97 | | - max-width: 900px; margin: 0 auto; |
| 96 | + position: relative; height: 650px; perspective: 1200px; |
| 97 | + max-width: 1000px; margin: 0 auto; |
98 | 98 | } |
99 | 99 | .carousel-track { |
100 | 100 | position: absolute; width: 100%; height: 100%; |
|
103 | 103 | } |
104 | 104 | .carousel-item { |
105 | 105 | position: absolute; left: 50%; top: 0; |
106 | | - width: 220px; height: 440px; |
| 106 | + width: 280px; height: 560px; |
107 | 107 | transform-style: preserve-3d; |
108 | 108 | transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.6s; |
109 | 109 | } |
110 | 110 | .carousel-item img { |
111 | 111 | width: 100%; height: 100%; object-fit: cover; |
112 | 112 | border-radius: 16px; border: 1px solid var(--border); |
113 | 113 | box-shadow: 0 20px 60px rgba(0,0,0,0.4); |
| 114 | + cursor: pointer; |
| 115 | + transition: transform 0.3s ease, box-shadow 0.3s ease; |
| 116 | +} |
| 117 | +.carousel-item.active img:hover { |
| 118 | + transform: scale(1.8); |
| 119 | + box-shadow: 0 30px 80px rgba(67,230,195,0.2); |
| 120 | + z-index: 200; |
| 121 | + position: relative; |
114 | 122 | } |
115 | 123 | .carousel-item .caption { |
116 | 124 | text-align: center; margin-top: 16px; |
|
121 | 129 | .carousel-item.active img { border-color: var(--brand); } |
122 | 130 | .carousel-nav { |
123 | 131 | display: flex; justify-content: center; gap: 12px; margin-top: 24px; |
124 | | - position: relative; top: 490px; |
| 132 | + position: relative; top: 600px; |
125 | 133 | } |
126 | 134 | .carousel-dot { |
127 | 135 | width: 10px; height: 10px; border-radius: 50%; |
@@ -344,7 +352,7 @@ <h3 data-en="Start coding!" data-zh="开始编程!">Start coding!</h3> |
344 | 352 |
|
345 | 353 | function updateCarousel() { |
346 | 354 | const angleStep = 360 / total; |
347 | | - const radius = 320; |
| 355 | + const radius = 380; |
348 | 356 | items.forEach((item, i) => { |
349 | 357 | const offset = ((i - current) % total + total) % total; |
350 | 358 | const angle = offset * angleStep; |
|
0 commit comments