Skip to content

Commit 2b92bd7

Browse files
committed
update: add some transition and animation
1 parent 3749a81 commit 2b92bd7

File tree

3 files changed

+76
-2
lines changed

3 files changed

+76
-2
lines changed

location.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ <h2>台中清水旗艦店</h2>
146146
<a href="./location-02.html" target="_blank">詳細資訊</a>
147147
</div>
148148
<!-- card-4 -->
149-
<div class="location-card card-3">
149+
<div class="location-card card-4">
150150
<div class="img-frame">
151151
<img src="./img-location/location-kaohsiung-figure.png" alt="高雄中正形象店">
152152
</div>
@@ -180,7 +180,7 @@ <h2>高雄中正形象店</h2>
180180
<a href="./location-02.html" target="_blank">詳細資訊</a>
181181
</div>
182182
<!-- card-5 -->
183-
<div class="location-card card-3">
183+
<div class="location-card card-5">
184184
<div class="img-frame">
185185
<img src="./img-location/location-kaohsiung-dream.png" alt="高雄夢時代店">
186186
</div>

series-02.css

+36
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@
137137
}
138138

139139
@layer components {
140+
@keyframes floating {
141+
0% {
142+
transform: translateY(-8px);
143+
}
144+
50% {
145+
transform: translateY(8px);
146+
}
147+
100% {
148+
transform: translateY(-8px);
149+
}
150+
}
140151
.sub-nav {
141152
width: 100%;
142153
--nav-textBorderBottom: #aa0601;
@@ -364,6 +375,19 @@
364375
}
365376
}
366377
}
378+
& .items:nth-of-type(2n) {
379+
animation-name: floating;
380+
animation-duration: 4s;
381+
animation-timing-function: linear;
382+
animation-iteration-count: infinite;
383+
}
384+
& .items:nth-of-type(2n-1) {
385+
animation-name: floating;
386+
animation-delay: 2s;
387+
animation-duration: 4s;
388+
animation-timing-function: linear;
389+
animation-iteration-count: infinite;
390+
}
367391
}
368392

369393
& .grid-container {
@@ -390,6 +414,7 @@
390414
justify-content: center;
391415
align-items: center;
392416
padding-block: 80px;
417+
color: #555;
393418

394419
& .prev,
395420
.next,
@@ -399,11 +424,22 @@
399424
align-items: center;
400425
border: 1px solid #555555;
401426
}
427+
& .prev:hover,
428+
.next:hover,
429+
.page:hover {
430+
transition: all 0.3 ease;
431+
transform: translateY(-10px);
432+
cursor: pointer;
433+
background-color: var(--button-bg);
434+
color: #ffb400;
435+
}
436+
402437
& .prev,
403438
.next {
404439
width: 81px;
405440
height: 48px;
406441
font-size: 19px;
442+
background-color: #f2f2f2;
407443
}
408444

409445
& .page {

series.css

+38
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@
137137
}
138138

139139
@layer components {
140+
@keyframes floating {
141+
0% {
142+
transform: translateY(-8px);
143+
}
144+
50% {
145+
transform: translateY(8px);
146+
}
147+
100% {
148+
transform: translateY(-8px);
149+
}
150+
}
140151
.sub-nav {
141152
width: 100%;
142153
--nav-textBorderBottom: #aa0601;
@@ -318,6 +329,7 @@
318329
position: relative;
319330
/* max-width: 306px; */
320331
width: auto;
332+
321333
& .img-container {
322334
/* width: 306px; */
323335
height: 100%;
@@ -378,6 +390,20 @@
378390
}
379391
}
380392
}
393+
394+
& .items:nth-of-type(2n) {
395+
animation-name: floating;
396+
animation-duration: 4s;
397+
animation-timing-function: linear;
398+
animation-iteration-count: infinite;
399+
}
400+
& .items:nth-of-type(2n-1) {
401+
animation-name: floating;
402+
animation-delay: 2s;
403+
animation-duration: 4s;
404+
animation-timing-function: linear;
405+
animation-iteration-count: infinite;
406+
}
381407
}
382408

383409
& .grid-container {
@@ -404,6 +430,7 @@
404430
justify-content: center;
405431
align-items: center;
406432
padding-block: 80px;
433+
color:#555;
407434

408435
& .prev,
409436
.next,
@@ -413,11 +440,22 @@
413440
align-items: center;
414441
border: 1px solid #555555;
415442
}
443+
& .prev:hover,
444+
.next:hover,
445+
.page:hover {
446+
transition: all 0.3 ease;
447+
transform: translateY(-10px);
448+
cursor: pointer;
449+
background-color: var(--button-bg);
450+
color: #ffb400;
451+
}
452+
416453
& .prev,
417454
.next {
418455
width: 81px;
419456
height: 48px;
420457
font-size: 19px;
458+
background-color: #F2F2F2;
421459
}
422460

423461
& .page {

0 commit comments

Comments
 (0)