ํค ํ๋ ์์ ์ฌ์ฉํ ๋ css-modules์์ ๋ค์๊ณผ ๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ๊ฒฌ๋์์ต๋๋ค.
์๋ CSS ์ฝ๋ :
<strong i="7">@keyframes</strong> rotating {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
.rotating-item {
animation: 5s linear 0 infinite rotating;
}
๋ค์ ์ฝ๋๋ก ์ปดํ์ผ๋ฉ๋๋ค.
@-webkit-keyframes rotating___3vsQl {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
<strong i="11">@keyframes</strong> rotating___3vsQl {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.rotating-item___3pALh {
-webkit-animation: 5s linear 0 infinite :local(rotating);
animation: 5s linear 0 infinite :local(rotating);
}
์ฌ๋ฐ๋ฅธ ๊ฒ์ ๋ค์๊ณผ ๊ฐ์์ผํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
@-webkit-keyframes rotating___3vsQl {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
<strong i="15">@keyframes</strong> rotating___3vsQl {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.rotating-item___3pALh {
-webkit-animation: 5s linear 0 infinite rotating___3vsQl;
animation: 5s linear 0 infinite rotating___3vsQl;
}
css-modules ๋ฒ๊ทธ์ธ์ง ์๋๋ฉด webpack์ ๊ตฌ์ฑ ๋ฌธ์ ์ธ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค.
๋ ธํธ :
- dva-cli๋ก ์์ฑ ๋ ํ๋ก์ ํธ๋ ์นํฉ ๊ตฌ์ฑ์ ์์ ํ์ง ์์์ต๋๋ค.
- ์ฒ์์๋ ๋ ์ผ๋๋ฐ css๋ก ๋ฐ๊พธ๋ฉด ์๋๋ค์.
๊ธ์ด ์ ์ ๊ฒฝ์ฐ
<strong i="25">@keyframes</strong> :global(rotating)
๊ฐ ์ค๋ฅ๋ฅผ๋ณด๊ณ ํจ์ ๋ํ๋ ๋๋ค.๋๊ตฌ ๋ฒ์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
https://github.com/css-modules/css-modules/issues/141#issuecomment -243011699
์ด๊ฒ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์ต๋๊น?
๊ฐ์ฌํฉ๋๋ค ๐!
์, ๊ด์ฐฎ์ต๋๋ค.ํ์ง๋ง ๋ฌธ์ ๋
animation: name .6s ease; // ่ฟๆ ทๆฏๅฏไปฅ็
animation: .6s ease name; // ่่ฟๆ ทๅฐฑไธไผ่ขซ่ฏๅซๅฐไบ
mozilla์ ๋ฌธ์์ ์ํน ํจ์์ต๋๋ค ๐
<single-animation> = <time> || <single-timing-function> || <time> || <single-animation-iteration-count> || <single- animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ] /* <strong i="11">@keyframes</strong> duration | timing-function | delay | iteration-count | direction | fill-mode | play-state | name */ animation: 3s ease-in 1s 2 reverse both paused slidein; /* <strong i="12">@keyframes</strong> duration | timing-function | delay | name */ animation: 3s linear 1s slidein; /* <strong i="13">@keyframes</strong> duration | name */ animation: 3s slidein;
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ฐ์ฌํฉ๋๋ค ๐!
์, ๊ด์ฐฎ์ต๋๋ค.ํ์ง๋ง ๋ฌธ์ ๋
mozilla์ ๋ฌธ์์ ์ํน ํจ์์ต๋๋ค ๐