我想使用此代码,但我想要动画垂直。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