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. HTML5畫布上移動TiledMap類背景
- 4. HTML5畫布作爲背景
- 5. HTML5畫布背景圖片
- 6. jQuery中無盡的背景色動畫,如何?
- 7. 無盡的動畫CSS傾斜漸變背景
- 8. 快速無盡的滾動背景
- 9. SpriteKit中無盡的滾動背景
- 10. Bootstrap無盡背景圖片
- 11. 無盡的背景spritekit
- 12. HTML5畫布 - 製作帶落金片的動畫背景
- 13. jQuery無盡動畫
- 14. 無盡的動畫?
- 15. 動畫背景UIImage
- 16. Hikari:背景動畫
- 17. JPanel動畫背景
- 18. colorchange動畫背景
- 19. jquery動畫背景
- 20. Jquery背景動畫
- 21. 透明圖像背景HTML5畫布
- 22. HTML5畫布背景圖像重複
- 23. HTML5生成畫布背景圖像
- 24. JQuery的背景位置動畫無限
- 25. 無限背景動畫與velocity.js
- 26. 無限背景位置動畫 - jQuery
- 27. jquery:無插件動畫背景位置?
- 28. HTML5和畫布:隨着玩家的移動而移動背景
- 29. 在html5畫布中滾動/滑動背景
- 30. 無盡的線程在背景和GC
感謝的Oguzhan,偉大工程:) –