0
運作良好,我要上傳的三個塊逐一我想使動畫控制與CSS3的幫助下變換。現在發生的事情是,它在谷歌瀏覽器中正常工作(正是我想要的),但在Firefox中無法正常工作。在Firefox中,三個塊首先可見,並且比css3動畫開始工作,我不想要。我希望從谷歌瀏覽器開始的動畫。CSS3動畫無法在Firefox中
body {
font-size: 14px;
line-height: 18px;
font-family: arial;
}
.wrapper {
width: 960px;
margin: 10px auto;
}
.one {
float: left;
width: 100px;
height: 100px;
margin: 20px 0;
border: 1px solid #afafaf;
background: #ddd;
animation: one 1s ease 1s;
-webkit-animation: one 1s ease 1s;
}
@keyframes one {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes one {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
.two {
float: left;
width: 100px;
height: 100px;
margin: 20px 0;
border: 1px solid #afafaf;
background: #ddd;
animation: two 2s ease 2s;
-webkit-animation: two 2s ease 2s;
}
@keyframes two {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes two {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
.three {
float: left;
width: 100px;
height: 100px;
margin: 20px 0;
border: 1px solid #afafaf;
background: #ddd;
animation: two 3s ease 3s;
-webkit-animation: two 3s ease 3s;
}
@keyframes three {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes three {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
<section class="wrapper">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</section>
嘿扎克,這是真的很有幫助。我將這些代碼應用於我的項目,現在工作正常。 – 2014-11-15 06:06:55
太棒了!如果答案幫助您解決了問題,則可以單擊箭頭下方答案旁邊的複選標記。它會標誌着答案被接受,給你和我一些聲譽:) – 2014-11-15 07:37:58