일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- localstorage
- scrollY
- scroll
- swiper
- For
- Animation
- 스크롤
- JavaScript
- SQLD
- swiperjs
- 가로스크롤
- 애니메이션
- forEach
- React
- getBoundingClientRect
- NodeList
- Hover
- css
- insertAdjacentHTML
- addEventListener
- pointermove
- Sticky
- 반복문
- mousemove
- classList
- 이벤트리스너
- html
- ADsP
- scrollevent
- input
- Today
- Total
목록getBoundingClientRect (3)
ZeroToHunnit Coding

위와 같이 각 번호에 마우스를 올리면 밑에 바가 자연스럽게 옆으로 움직이는 애니메이션을 만들어보았다. HTML 1번임 2번임 3번임 4번임 5번임 CSS .row{ width: 100%; display: flex; justify-content: center; align-items: center; margin-top: 300px; position: relative; } li{ width: 250px; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 40px; cursor: pointer; transition: all 0.3s; } li:hover{ color: crimson; } .line{ posi..

각 박스에 도달하면 하단 고정 메뉴안에 해당되는 박스의 메뉴가 활성화되고 큰 섹션을 나가면 모든 활성화가 사라지는 ui를 만들어 보았다. HTML box1 box2 box3 box4 box1 box2 box3 box4 섹션안에 박스 네개와 list가 포함된 menu박스를 만들어주었다. CSS .section{ margin-top: 400px; margin-bottom: 400px; background-color: #999; padding: 200px; } .box{ width: 100%; height: 150vh; margin-top: 200px; background-color: black; color: white; font-size: 60px; } .menu{ position: sticky; botto..

이렇게 특정 위치에 도달하면 div의 속성을 바꾸고 특정 위치를 벗어나면 속성을 원래대로 돌리는 애니메이션을 만들었다. HTML 여기는 고정! 왼쪽은 고정, 오른쪽에 여러개의 box를 만들어두었다. CSS .section{ width: 100%; height: 500vh; margin-top: 500px; display: flex; } .left{ position: sticky; top: 0; width: 50%; height: 100vh; } .left p{ text-align: center; font-size: 60px; margin-top: 300px; } .right{ width: 50%; display: flex; } .right-left, .right-right{ width: 50%; } .r..