我想使用此代碼,但我想要動畫垂直。Css3動畫垂直
header {
width: 100%;
height: 150px;
background-image: url(http://www.scottishheritageusa.org/imgs/header_separator.png); //replace with your image
background-position: 0px;
background-repeat: repeat-x;
-webkit-animation: myanim 5s infinite linear;
-moz-animation: myanim 5s infinite linear;
-o-animation: myanim 5s infinite linear;
animation: myanim 5s infinite linear;
}
@-webkit-keyframes myanim {
0% { background-position: 0px; }
100% { background-position: 100px; } /* set this to the width of the image */
}
@-moz-keyframes myanim {
0% { background-position: 0px; }
100% { background-position: 100px; } /* set this to the width of the image */
}
@-o-keyframes myanim {
0% { background-position: 0px; }
100% { background-position: 100px; } /* set this to the width of the image */
}
@keyframes myanim {
0% { background-position: 0px; }
100% { background-position: 100px; } /* set this to the width of the image */
}
,我發現這個代碼在這裏:http://jsfiddle.net/e3WLD/3/
感謝您的幫助
感謝您的回覆。我做了這個改變,但只有一個問題,我的動畫看起來有點像卡住(第二秒跳))!你可以在這裏查看:www.nikos-efi.gr – Vachos
你可以在小提琴中重現嗎? – tdhulster
好吧,我讓它工作。我不會在px中將圖像放在圖像上。現在一切正常完美!感謝您的幫助 – Vachos