반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- classList
- scroll
- getBoundingClientRect
- scrollY
- 반복문
- mousemove
- React
- pointermove
- NodeList
- 애니메이션
- input
- swiperjs
- scrollevent
- Hover
- localstorage
- css
- 스크롤
- NAV
- forEach
- addEventListener
- For
- html
- Sticky
- width
- 확장성
- swiper
- JavaScript
- 이벤트리스너
- Animation
- insertAdjacentHTML
Archives
- Today
- Total
목록페이지량 (1)
ZeroToHunnit Coding
[Javascript] 현재 스크롤 퍼센트를 나타내주는 bar
스크롤을 내리면 전체 페이지 중 현재 어디 쯤을 읽고있는지 나타내주는 바를 만들어 보았다. HTML CSS body, html{ height: 6000px; } .bar{ width: 100vw; height: 50px; position: fixed; top: 0; left: 0; background-color: #999; } .percent{ width: 0; height: 100%; background-color: black; transition: all 0.1s; } 전체 높이 6000px로 잡아주고 bar 박스는 위에 고정시켜주었다. JAVASCRIPT let percent = document.querySelector('.percent'); let screenHeight = document.que..
JAVASCRIPT
2024. 1. 3. 15:38