如果我錯了,請糾正我,但我必須注意,反向動畫在Safari中不起作用。我不是第一個問這個問題的人,但是因爲我還沒有找到答案,所以我發佈了這個問題。Safari可以播放反向css3動畫嗎?
有沒有什麼辦法可以在Safari中製作反向動畫? ...或者我應該忘記他們?
實施例:
<!DOCTYPE html>
<head>
<style>
div{
Background-color: red;
font-size:2vw;
position:fixed;
top:40%;
right:0%;
width:100%;
height:12%;
/*animation*/
-webkit-animation:test_drive 5s;
-moz-animation:test_drive 5s;
-ms-animation:test_drive 5s;
-o-animation:test_drive 5s;
animation:test_drive 5s;
/*animation-direction*/
-webkit-animation-direction:reverse;
-moz-animation-direction:reverse;
-ms-animation-direction:reverse;
-o-animation-direction:reverse;
animation-direction:reverse;
z-index:3;
}
@-webkit-keyframes test_drive{
0% {left:0%; top:40%;}
100% {left:0%; top:88%;}
}
@-ms-keyframes test_drive{
0% {left:0%; top:40%;}
100% {left:0%; top:88%;}
}
@-moz-keyframes test_drive{
0% {left:0%; top:40%;}
100% {left:0%; top:88%;}
}
@-o-keyframes test_drive{
0% {left:0%; top:40%;}
100% {left:0%; top:88%;}
}
@keyframes test_drive{
0% {left:0%; top:40%;}
100% {left:0%; top:88%;}
}
</style>
<title>Test_Drive</title>
</head>
<body>
<div>Unlike Chrome, Firefox, Opera or IE, Safari plays this in "normal" direction.</div>
</body>
</html>
感謝您的糾正。 – 2014-09-26 12:31:03
不過,我不明白爲什麼它真的有效。每個瀏覽器都會在相反時播放它。 – 2014-09-26 13:09:05
你投了票,但我錯誤的我點擊箭頭,所以失去了聲譽。你能否再請一遍。 – Ashish 2014-09-26 13:09:51