Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions Week1/Homework/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,26 @@ <h3>풍경</h3>
<!-- ========== 갤러리 ========== -->
<section id="gallery" class="gallery-section">
<h2>사진첩</h2>
<div class="snap-gallery">
<div class="gallery-item">
<img src="images/goorm.png" alt="구름톤유니브">
</div>
<div class="gallery-item">
<img src="images/selfie.png" alt="거울샷">
</div>
<div class="gallery-item">
<img src="images/dog.png" alt="집옆편의점강아지">
</div>
<div class="gallery-item">
<img src="images/selfie2.png" alt="전시회">
</div>
<div class="gallery-item">
<img src="images/sopt.png" alt="솝트">
</div>
<div class="gallery-item">
<img src="images/hangang.png" alt="한강">
<div class="snap-gallery-wrapper">
<div class="snap-gallery">
<div class="gallery-item">
<img src="images/goorm.png" alt="구름톤유니브">
</div>
<div class="gallery-item">
<img src="images/selfie.png" alt="거울샷">
</div>
<div class="gallery-item">
<img src="images/dog.png" alt="집옆편의점강아지">
</div>
<div class="gallery-item">
<img src="images/selfie2.png" alt="전시회">
</div>
<div class="gallery-item">
<img src="images/sopt.png" alt="솝트">
</div>
<div class="gallery-item">
<img src="images/hangang.png" alt="한강">
</div>
</div>
</div>
</section>
Expand Down
39 changes: 32 additions & 7 deletions Week1/Homework/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ section {
white-space: nowrap;
}

.nav-item:first-child .nav-link {
border-radius: 30px 30px 10px 10px;
}

.nav-item:last-child .nav-link {
border-radius: 10px 10px 30px 30px;
}

.nav-link:hover {
background-color: #d4f1f4;
color: #232323;
Expand Down Expand Up @@ -532,19 +540,36 @@ section {
color: #232323;
}

/* 갤러리 래퍼 (무한 루프용) */
.snap-gallery-wrapper {
overflow: hidden;
background-color: #f8f9fa;
padding: 50px;
border-radius: 30px;
position: relative;
}

/* 스크롤 갤러리 */
.snap-gallery {
display: flex;
gap: 20px;
overflow-x: auto;
background-color: #f8f9fa;
padding: 50px;
border-radius: 30px;
width: fit-content;
animation: auto-scroll 10s linear infinite;
}

/* 스크롤바 숨기기 */
.snap-gallery::-webkit-scrollbar {
display: none;
/* 호버 시 애니메이션 일시정지 */
.snap-gallery-wrapper:hover .snap-gallery {
animation-play-state: paused;
}

/* 자동 스크롤 애니메이션 */
@keyframes auto-scroll {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

/* 갤러리 아이템 */
Expand Down