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
- CLONE
- nodejs
- GRID
- JavaScript
- TypeScript
- DART
- pug
- ECMAScript
- backend
- HTML
- MongoDB
- CSS
- graphQL
- form
- NextJs
- ES6
- react
- clonecoding
- Component
- Flutter
- Mongoose
- frontend
- 리액트
- express
- 자바스크립트
- Session
- API
- javscript
- node.js
- heroku
Archives
- Today
- Total
Enjoy Programming
[animation] custom animation - animation-play-state 본문
tailwind를 사용하던 중 오랜만에 slide animation을 구현할 일이 생겼다.
신규 beta launching 한 사이트 navigation에 text sliding 이다.
우선 거두 절미 tailwind에 custom animation은 tailwind config에서

이런식으로 설정 해주면 된다..
근데.. 마우스를 올리면 해당 animation을 paused 시키고 싶었다.
찾아보니 css property 중에 animation-play-state 라는 것이 존재 했다.
https://developer.mozilla.org/en-US/docs/Web/CSS/animation-play-state
animation-play-state - CSS: Cascading Style Sheets | MDN
The animation-play-state CSS property sets whether an animation is running or paused.
developer.mozilla.org
참고하자. 근데 이걸 어찌쓴다?
tailwind에는 해당 속성이 유틸리티화 되어 있지 않았다..
그래서 쓴 꼼수 방법은 global css에

해당 태그에 classname을 설정 후 hover시 paused를 할 수있게 해주었다.

화면 기록 2022-11-07 21.51.44.mov
5.11MB
잘 된다.
'CSS > TailwindCss' 카테고리의 다른 글
[@layer] 기록 (0) | 2022.05.10 |
---|---|
Tailwind css (0) | 2022.04.24 |