일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- addEventListener
- classList
- 스크롤
- swiperjs
- insertAdjacentHTML
- scrollevent
- Hover
- mousemove
- Sticky
- width
- 반복문
- html
- forEach
- 이벤트리스너
- getBoundingClientRect
- pointermove
- React
- input
- css
- 확장성
- For
- scroll
- swiper
- NAV
- JavaScript
- NodeList
- scrollY
- 애니메이션
- localstorage
- Animation
- Today
- Total
목록scroll (11)
ZeroToHunnit Coding
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bYofHs/btsCN1AdZYS/C9vp5K2Qog0utHIRIQInDK/img.gif)
스크롤하면 메인 title이 서서히 사라지고 메인 visual의 크기가 커지면서 전체 화면을 차지하는 애니메이션을 만들어보았다. 잘 쓰면 꽤나 멋진 홈페이지를 만들 수 있지 않을까 싶다. HTML 무슨 일이 일어날까요?? 짜잔~ HTML은 간단하게 타이틀과 사진만 배치했다. CSS .title-box { position: fixed; top: 300px; left: 30%; z-index: 10; } .title { font-size: 60px; } .section { margin-top: 600px; width: 100%; height: 200vh; margin-bottom: 600px; } .photo-wrap { display: flex; justify-content: center; gap: 60p..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/zWR3N/btsCzFq8ooI/EQ4QZ0jFllMH41XmOEBrp1/img.gif)
스크롤할 때 div가 내려가는 속도가 각각 다르게 할 수 있다. HTML HTML은 간단하게 좌우에 박스만 두었다. CSS .section{ display: flex; justify-content: center; align-items: center; width: 100%; margin-top: 500px; margin-bottom: 500px; } .left, .right{ width: 50%; justify-content: center; display: flex; flex-direction: column; margin: 100px; } .left{ align-items: end; } .right{ align-items: start; } .right{ transform: translateY(100px);..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/b88JVD/btsCg3d1BvX/WfrQlHt2VPR51fc7qaWyY0/img.png)
Scroll Event(스크롤 이벤트)를 이용한 div 크기 변경 * position: sticky * 일차함수 * Scroll Event Preview Scroll의 위치가 600 ~ 1400 까지는 width: 50vw ~ 100vw로, height: 50vh ~ 100vh 로 서서히 커지게 하고, 4000 ~ 4600에서는 width: 100vw ~ 0로, height: 100vh ~ 0으로 서서히 없어지게 한다. HTML 나 커질거임 HTML은 이렇게 간단하게 설정해줍니다. CSS .bg{ width: 100%; height: 5000px; margin-top: 600px; margin-bottom: 600px; } .bx{ width: 50vw; height: 50vh; background: #..