我正在尝试将CSS动画应用于<span>元素,但我就是不能让它工作。我找不到任何资源来说明动画是否可以应用于<span>元素。那么,是我在犯错,还是跨度动画是免疫的呢?
编辑:代码
Inf<span class="inf_o">o</span>rmation
<br>
do<span class="don_n">n</span>e
<br>
we<span class="dbl_l">ll</span>和css:
/* animations */
.inf_o
{
-webkit-animation-name: lower_head;
-webkit-animation-duration: 3s;
-webkit-animation-timing-function:ease-in;
-webkit-animation-delay: 1s;
-webkit-animation-play-state: active;
}
@-webkit-keyframes lower_head
{
from {margin-top:0px;}
to {margin-top:10px;}
}发布于 2011-07-30 12:48:10
看起来你必须设置一个显示属性。很明显,block会把单词搞乱,所以你需要使用inline。我为您准备了一个jsfiddle:http://jsfiddle.net/jdmiller82/XWkRX/1/
正如你所看到的'o‘动画向下。
https://stackoverflow.com/questions/6881045
复制相似问题