๐ธ Keyframe ์์๋ณด๊ธฐ
<div class="box"></div>
<ul class="progress">
<li></li>
</ul>
/* ๋ธ๋ผ์ฐ์ ๊ตฌ๋ถ ์์ด ํ์ค๋ฐฉ์์ w3c์์ ๊ถ๊ณ */
@keyframes{}
/* ๋ฒค๋ํ๋ฆฌํฝ์ค : ๋ธ๋ผ์ฐ์ ์ ์กฐ์ฌ๋ฅผ ๊ตฌ๋ถํ๋ ์ฝ๋๋ก,
๋ธ๋ผ์ฐ์ ๋ง๋ค ์์ฑ์ ์ฒ๋ฆฌํ๋ ๋ฐฉ์์ด ๋ฌ๋ผ ๊ฐ ๋ธ๋ผ์ฐ์ ์ ๋ง๋ ์์ฑ์
๋ณ๋๋ก ์์ฑํด์ผ ํฉ๋๋ค. */
/* Opera์ฌ์ Opera๋ธ๋ผ์ฐ์ ๋๋ถ๋ถ ๋ชจ๋ฐ์ผ์ ์ฉ ๋ธ๋ผ์ฐ์ */
@-o-keyframes{}
/* Micro Soft์ฌ์ IE */
@-ms-keyfrmes{}
/* Mozilla์ฌ์ Fire Fox */
@-moz-keyframes{}
/* webkit์์ง ๊ธฐ๋ฐ์ผ๋ก ๋ง๋ค์ด์ง ๋ธ๋ผ์ฐ์ , ํฌ๋กฌ, ์ฌํ๋ฆฌ, ์ฃ์ง ๋ฑ */
@-webkit-keyframes{}
@keyframes myAni{
0%{
width: 200px;
height: 200px;
transform: rotate(0deg);
}
50%{
width: 400px;
height: 400px;
transform: rotate(720deg);
}
100%{
width: 200px;
height: 200px;
transform: rotate(0deg);
}
}
.box{
width: 200px; height: 200px;
background-color: #f90;
transition-property: width, background-color;
transition-duration: 0.3s;
/* ๊ตฌ์ฑ๋ ํคํ๋ ์์ ์ด๋ฆ */
/* animation-name: myAni; */
/* ํคํ๋ ์์ด ์๋๋๋ ์๊ฐ */
animation-duration: 3s;
/* ํคํ๋ ์์ ๋ฐ๋ณต ํ์ */
animation-iteration-count: infinite;
/* animation: name duration timing-function delay iteration-count direction fill-mode; */
animation-play-state: paused;
}
.box:hover{
width: 400px;
}
.box:active{
background-color: #f00;
}
.progress{
padding: 0;
margin: 0;
list-style: none;
width: 600px;
background-color: #ccc;
}
.progress li{
width: 0%;
height: 30px;
background-color: #f60;
border-radius: 20px;
border: 4px solid #ccc;
box-sizing: border-box;
animation-name: myProg;
animation-duration: 1s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
/* linear(์ผ์ ํ์๋) | ease-in(๊ฐ์) | ease-out(๊ฐ์) |*/
animation-timing-function: cubic-bezier(0,1.17,1,.39);
}
@keyframes myProg{
0%{
width: 0%;
}
100%{
width: 90%;
}
}