Skip to content

Commit f84f60c

Browse files
committed
fix: enlarge carousel screenshots and add hover zoom on active image
1 parent 51c2876 commit f84f60c

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

docs/index.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
.screenshots { padding: 100px 2rem; overflow: hidden; }
9494
.screenshots h2 { text-align: center; font-size: 2rem; margin-bottom: 3rem; }
9595
.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;
9898
}
9999
.carousel-track {
100100
position: absolute; width: 100%; height: 100%;
@@ -103,14 +103,22 @@
103103
}
104104
.carousel-item {
105105
position: absolute; left: 50%; top: 0;
106-
width: 220px; height: 440px;
106+
width: 280px; height: 560px;
107107
transform-style: preserve-3d;
108108
transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.6s;
109109
}
110110
.carousel-item img {
111111
width: 100%; height: 100%; object-fit: cover;
112112
border-radius: 16px; border: 1px solid var(--border);
113113
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;
114122
}
115123
.carousel-item .caption {
116124
text-align: center; margin-top: 16px;
@@ -121,7 +129,7 @@
121129
.carousel-item.active img { border-color: var(--brand); }
122130
.carousel-nav {
123131
display: flex; justify-content: center; gap: 12px; margin-top: 24px;
124-
position: relative; top: 490px;
132+
position: relative; top: 600px;
125133
}
126134
.carousel-dot {
127135
width: 10px; height: 10px; border-radius: 50%;
@@ -344,7 +352,7 @@ <h3 data-en="Start coding!" data-zh="开始编程!">Start coding!</h3>
344352

345353
function updateCarousel() {
346354
const angleStep = 360 / total;
347-
const radius = 320;
355+
const radius = 380;
348356
items.forEach((item, i) => {
349357
const offset = ((i - current) % total + total) % total;
350358
const angle = offset * angleStep;

0 commit comments

Comments
 (0)