2
这里是我用于动画的CSS。任何帮助获得这项工作将非常感激。背景图像应该越来越大,并且与按钮的文字一起居中。然而,当我徘徊时,它安然无恙地坐在那里,拒绝移动。为什么这些按钮没有在Firefox或Chrome中使用CSS3动画?
@keyframes buttonAnim{
from{
background-color: rgba(63,62,68,0.75);
background-size: 40%;
background-position: left;
padding-left:40px;
text-align: left;
}
to {
background-color: rgba(63,62,68,0.95);
background-size: 100%;
background-position: center;
padding-left:0px;
text-align: center;
}
}
.button{
color:White;
background-image: url(/images/buttonBack.png);
background-color: rgba(63,62,68,0.75);
border: white 1px solid;
border-radius: 5px;
background-size: 40%;
background-position: left;
background-repeat: no-repeat;
padding-left: 30px;
text-align: left;
min-height: 40px;
line-height: 38px;
}
.button:hover{
animation: buttonAnim 1s;
}
你使用什么浏览器? – joshuahealy
测试在Firefox和铬 – user2558999
使用-webkit前缀为铬 –