【发布时间】:2013-02-10 13:56:18
【问题描述】:
我在 css 中创建了一个旋转动画,它需要 1 秒,并使用 .comet 类设置了“前进”。我怎样才能在每次点击外部元素时启动该动画?
#carousel #big_bubble #cometa.rotation{animation:rotation 1s forwards; -moz-animation:rotation 1.5s forwards; -webkit-animation:rotation 1s forwards; -o-animation:rotation forwards 1s; }
@-moz-keyframes rotation{
from{transform:rotate(0deg);}
to{transform:rotate(-360deg);}
@-webkit-keyframes rotation{
from{-webkit-transform:rotate(0deg);}
to{-webkit-transform:rotate(-360deg);}
}
【问题讨论】:
-
你能提供一个 FIDDLE 链接吗?
-
我在 CSS 上提供了动画。