我有一个简单的CSS动画文本褪色:CSS动画不工作
#title{
animation: text 2s;
-webkit-animation: text 2s;
-moz-animation: text 2s;
-o-animation: text 2s;
font-family: 'Lato300', sans-serif;
height: 115px;
position: absolute;
bottom: -10px;
left: 0;
right: 0;
margin-bottom: auto;
margin-left: auto;
margin-right: auto;
text-align: center;
}
@keyframes text{
0% {display: none;}
100% {display: inline;}
}
@-moz-keyframes text{
0% {display: none;}
100% {display: inline;}
}
@-webkit-keyframes text{
0% {display: none;}
100% {display: inline;}
}
@-o-keyframes text{
0% {display: none;}
100% {display: inline;}
}
的HTML:
<div id="title"><h1>Text goes here</h1></div>
出于某种原因,该动画不能播放。有谁知道为什么? (我保留所有代码加上其他事情正在导致此问题)
W hy没有jquery?因为css动画不支持所有浏览器? – Dolo 2013-04-06 07:45:36
不,它支持在我正在使用的Safari中。浏览器老旧的用户习惯于网页看起来有点过时和过时。 – william44isme 2013-04-06 07:49:23