【发布时间】:2011-10-17 09:13:20
【问题描述】:
我正在尝试对 CSS(特别是 webkit)中的形状进行简单的转换。 动画按预期运行,但完成后 div 将恢复到其初始状态。 有什么办法让它保持最终状态?
到目前为止,这是我的 CSS:
@-webkit-keyframes rotate-good {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(-90deg);
}
}
@-webkit-keyframes rotate-bad {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(90deg);
}
}
#good-arrow
{
-webkit-animation-name: rotate-good;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 2s;
}
#bad-arrow
{
-webkit-animation-name: rotate-bad;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 2s;
}
【问题讨论】:
-
这是一个比另一个问题更老的问题
-
哟,根据下面 Javi 的评论,您能否将接受标记从我的回答更改为迈克尔的回答?确实比我的更正确。
标签: css