| 属性名 | animation-duration |
|---|---|
| 値 | <single-animation-duration> [, <single-animation-duration> ]* |
| 値の詳細 | <single-animation-duration> = <time> |
| 初期値 | 0s |
| 適用可能要素 | すべての要素 (::before, ::after を含む) |
| 継承 | 継承しない |
| メディア | visual |
| アニメーション | 不可 |
| CSS | IE/Edge | Firefox | Chrome | Opera | Safari |
|---|---|---|---|---|---|
| CSS3 | 10 | 5(-moz) 16 | 4(-webkit) 43 | 15(-webkit) 30 | 4(-webkit) 9 |
1回のアニメーションにかける時間を 0.5s などの時間で指定します。アニメーションに関する概要は animation を参照してください。
| 値 | 説明 |
|---|---|
| <time> | 1回のアニメーションにかける時間を指定します。 |
@keyframes myframe {
from {
color: #66f;
font-size: 20pt;
}
to {
color: #f66;
font-size: 24pt;
}
}
.test {
position: absolute;
animation-name: myframe;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-fill-mode: both;
}
<div class="test">A</div>