Skip to content

Commit

Permalink
feat: 메인페이지 스크롤을 내려주세요 애니메이션 추가 (#539)
Browse files Browse the repository at this point in the history
png 이미지 대신 css로 마우스형태 구현, 동작 추가
  • Loading branch information
not-using authored Aug 18, 2023
1 parent d520b53 commit 019879f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
26 changes: 25 additions & 1 deletion src/asset/css/MainBanner.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,32 @@
font-size: 1.2rem;
}

.main-banner__scroll_icon {
.main-banner__mouse {
margin-top: 1.6rem;
width: 2rem;
height: 3.4rem;
border: 0.2rem solid rgba(255, 255, 255, 0.5);
border-radius: 6rem;
position: relative;
&::before {
content: "";
width: 0.6rem;
height: 0.6rem;
position: absolute;
top: 0.3rem;
left: 50%;
transform: translateX(-50%);
background-color: white;
border-radius: 50%;
animation: wheel 3s infinite;
}
}

@keyframes wheel {
to {
opacity: 0;
top: 2.4rem;
}
}

@media screen and (max-width: 1199px) {
Expand Down
9 changes: 0 additions & 9 deletions src/asset/img/scroll-icon.svg

This file was deleted.

8 changes: 1 addition & 7 deletions src/component/main/MainBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Image from "../utils/Image";
import SearchBar from "../utils/SearchBar";
import ScrollIcon from "../../asset/img/scroll-icon.svg";
import "../../asset/css/Banner.css";
import "../../asset/css/MainBanner.css";

Expand All @@ -24,11 +22,7 @@ const MainBanner = () => {
</div>
<div className="main-banner__scroll">
<p className="font-12 color-d5">스크롤을 내려주세요</p>
<Image
src={ScrollIcon}
className="main-banner__scroll_icon"
alt="scroll-icon"
/>
<div className="main-banner__mouse" />
</div>
</div>
</section>
Expand Down

0 comments on commit 019879f

Please sign in to comment.