일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- React
- mousemove
- scroll
- scrollY
- getBoundingClientRect
- html
- 스크롤
- 반복문
- 애니메이션
- Hover
- 확장성
- swiperjs
- input
- localstorage
- scrollevent
- insertAdjacentHTML
- width
- pointermove
- Sticky
- Animation
- forEach
- css
- NodeList
- classList
- swiper
- JavaScript
- NAV
- addEventListener
- 이벤트리스너
- For
- Today
- Total
목록가로스크롤 (2)
ZeroToHunnit Coding
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/CSD04/btsEy2ZELSW/l0pCUebk0GpUBw8Vd3yDnk/img.gif)
위와 같이 가로(좌우)스크롤 시 각 섹션이 안보일 때까지 해당 제목이 고정되는 ui를 만들어보았다. HTML 1번 컨텐츠입니당 2번 컨텐츠입니당 3번 컨텐츠입니당 CSS body, html{ contain: paint; } .section{ width: 100%; height: 3000px; position: relative; margin: 500px 0; } .scroll{ height: 100vh; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; left: 0; } .box{ padding: 0 60px; width: 1400px; height: 700px; } .title{ mar..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/rxRRq/btsCEIbqLsE/f4no8LllGMAwlekkXOWKT0/img.gif)
스크롤을 내리다가 특정 위치가 되면 가로로 스크롤되는 것을 만들었다. HTML 가로 스크롤 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HTML은 매우 간단하다. 그냥 가로로 스크롤 될 박스 하나만 만들어주면 된다. CSS .section{ margin-top: 1000px; margin-bottom: 1000px; contain: paint; height: 300vh; } .scroll-box{ width: 200vw; height: 100vh; background: linear-gradient(90deg, #abc123,#321cba); position: sticky; top: 0; left: 0; } 이번에도 또한 pos..