wave.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <style type="text/css">
  7. #css3animationforbg {
  8. background: url(https://img.mukewang.com/6239d52509d39ace51200144.jpg) repeat-x center 0;
  9. height: 400px;
  10. width: 500px;
  11. clear: both;
  12. animation: animatedBackground 160s linear infinite;
  13. -o-animation: animatedBackground 160s linear infinite;
  14. -ms-animation: animatedBackground 160s linear infinite;
  15. -moz-animation: animatedBackground 160s linear infinite;
  16. -webkit-animation: animatedBackground 160s linear infinite;
  17. }
  18. @keyframes animatedBackground {
  19. from {
  20. background-position: 0 0;
  21. }
  22. to {
  23. background-position: -3168px 0;
  24. }
  25. }
  26. @-webkit-keyframes animatedBackground {
  27. from {
  28. background-position: 0 0;
  29. }
  30. to {
  31. background-position: -3168px 0;
  32. }
  33. }
  34. @-ms-keyframes animatedBackground {
  35. from {
  36. background-position: 0 0;
  37. }
  38. to {
  39. background-position: -3168px 0;
  40. }
  41. }
  42. @-moz-keyframes animatedBackground {
  43. from {
  44. background-position: 0 0;
  45. }
  46. to {
  47. background-position: -3168px 0;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div id="css3animationforbg"></div>
  53. </body>
  54. </html>