0
A
回答
5
原代码David Walsh - CSS Background Animations
@keyframes animatedBackground {
from {
background-position: 0 0;
}
to {
background-position: 100% 0;
}
}
#animate-area {
width: 560px;
height: 400px;
background-image: url(https://davidwalsh.name/demo/bg-clouds.png);
background-position: 0px 0px;
background-repeat: repeat-x;
animation: animatedBackground 40s linear infinite;
}
<div id="animate-area"></div>
2
我发布这个,因为你说从左到右。 你可以使用这样的东西。
#horizontal-scroll {
width: 1439px;
height: 1170px;
background: black url(https://assets.periscope.tv/images/map.svg);
-webkit-animation: backgroundScroll 50s linear infinite;
animation: backgroundScroll 50s linear infinite;
}
@-webkit-keyframes backgroundScroll {
from {
background-position: -1439px 0;
}
to {
background-position: 0 0;
}
}
@keyframes backgroundScroll {
from {
background-position: -1439px 0;
}
to {
background-position: 0 0;
}
}
<div id="horizontal-scroll"></div>
+0
感谢,工作,但我怎样才能使像:https://www.periscope.tv/404(.E:背景图像)动画在你的回答中重新开始 –
+0
https://jsfiddle.net/norcaljohnny/eoswn2yv/ –
+0
谢谢,工作像魅力:) –
0
@keyframes customname
{
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
classname
{
background-image: url(Url of tyour file);
width: width of the file;
height: Height of the file;
background-position: 0px 0px;
background-repeat: repeat-x; //Repeating through X axis only
animation: customname 40s linear infinite;
}
相关问题
- 1. HTML5旋转/动画背景
- 2. HTML5背景动画onScroll,最佳实践
- 3. jQuery中无尽的背景色动画,如何?
- 4. 快速无尽的滚动背景
- 5. 无尽的背景spritekit
- 6. Bootstrap无尽背景图片
- 7. HTML5画布 - 制作带落金片的动画背景
- 8. 动画背景UIImage
- 9. Hikari:背景动画
- 10. JPanel动画背景
- 11. colorchange动画背景
- 12. 无尽的动画?
- 13. 透明图像背景HTML5画布
- 14. 无限背景位置动画 - jQuery
- 15. jquery:无插件动画背景位置?
- 16. HTML5和画布:随着玩家的移动而移动背景
- 17. 无法做背景颜色的对HTML5的画布rectange
- 18. Cocos2D。各个方向的无尽背景
- 19. html5进度元素的动画背景颜色
- 20. 使用jQuery和HTML5数据属性的动画背景颜色
- 21. 的WinForms动画背景
- 22. jQuery:动画背景图片
- 23. jquery背景位置动画?
- 24. iOS中的动画背景
- 25. 动画背景图片
- 26. CSS3动画泡泡背景
- 27. android动画菜单背景
- 28. Andengine中的动画背景
- 29. C#Win Forms背景动画
- 30. NGIF动画背景问题
感谢的Oguzhan,伟大工程:) –