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 |
Tags
- 코드스테이츠
- 자료구조
- 스택
- 백준
- level1
- 30daysdowoonchallenge
- mysemester
- 카카오
- 프로토타입
- web
- javascript
- CSS
- React
- 회고
- 운영체제
- Next.js
- 큐
- 해시테이블
- useState
- UX
- 생활코딩
- Til
- superstarjypnation
- 자바스크립트
- UI
- redux
- html
- REST_API
- 프로그래머스
- vercel
Archives
- Today
- Total
데굴데굴
animated number counter 본문
웹을 구경하다가 자주 보게되는 이것
라이브러리를 쓸 수 있지만 동작하는 원리가 궁금해서 아래 글을 참고하며 간단하게 만들어보았다.
How to Build an Animated Counter with JavaScript - Studytonight
I am sure at some point in your life, while browsing the web, you have found a web page that shows an animated counter. A counter that starts from 0 and goes all the way up to some given number. Here is an example of how such a counter looks. In this artic
www.studytonight.com
처음에 함수를 실행해도 숫자가 올라가지 않아서 의아했는데 `target_num`이 `speed`보다 작아서 `increment`가 0이 되어버렸던 것이 문제였다. `speed`를 목표 숫자에 맞게 잘 설정해주는 것이 중요했다.
Comments