我在我的網站上有3個圖標,我想用CSS不透明度淡入淡出,我希望它們在動畫開始前隱藏。圖標的可見性需要從頭開始隱藏,但是在哪裏?這裏是我的代碼至今:CSS不透明度動畫
/* Animation keyframes for icons below carousel */
@-moz-keyframes icon-move {
0% {opacity: 0;}
25% {opacity: 0.2;}
50% {opacity: 0.4;}
75% {opacity: 0.6;}
100% {opacity: 1;}
}
@-webkit-keyframes icon-move {
0% {opacity: 0;}
25% {opacity: 0.2;}
50% {opacity: 0.4;}
75% {opacity: 0.6;}
100% {opacity: 1;}
}
@keyframes icon-move {
0% {opacity: 0;}
25% {opacity: 0.2;}
50% {opacity: 0.4;}
75% {opacity: 0.6;}
100% {opacity: 1;}
}
.icon {
-webkit-animation-name: icon-move;
-ms-animation-duration: 10s;
animation-duration: 10s;
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
-ms-animation-delay: 3s;
animation-delay: 3s;
-webkit-animation-iteration-count: 2;
-moz-animation-iteration-count: 2;
-ms-animation-iteration-count: 2;
animation-iteration-count: 2;
}
'.icon {不透明度:0}'? –
@JakobSternberg不要聽起來那麼難過:)誤解並不會改變你試圖幫助某個人是件好事的事實。 – csmckelvey