일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- localstorage
- getBoundingClientRect
- 반복문
- scroll
- NAV
- 이벤트리스너
- scrollY
- input
- For
- Animation
- html
- 애니메이션
- mousemove
- pointermove
- insertAdjacentHTML
- JavaScript
- css
- swiper
- width
- NodeList
- scrollevent
- 확장성
- Hover
- classList
- Sticky
- React
- 스크롤
- addEventListener
- forEach
- swiperjs
- Today
- Total
목록getBoundingClientRect (3)
ZeroToHunnit Coding
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bOJXwt/btsD8zDXG9R/YKmd60eQSkSyPTCunRPDRK/img.gif)
위와 같이 각 번호에 마우스를 올리면 밑에 바가 자연스럽게 옆으로 움직이는 애니메이션을 만들어보았다. 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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/b5LwyP/btsDkUghnTj/PsiBtEKdwXWo836FEx5eok/img.gif)
각 박스에 도달하면 하단 고정 메뉴안에 해당되는 박스의 메뉴가 활성화되고 큰 섹션을 나가면 모든 활성화가 사라지는 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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/AnE4n/btsCMzyiXv8/EzFvM5cxJ5uXKWDqH46Ei1/img.gif)
이렇게 특정 위치에 도달하면 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..