wave.css 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. body {
  2. background: radial-gradient(ellipse at center, rgba(255, 254, 234, 1) 0%, rgba(255, 254, 234, 1) 35%, #b7e8eb 100%);
  3. overflow: hidden;
  4. }
  5. .ocean {
  6. height: 5%;
  7. width: 100%;
  8. position: absolute;
  9. bottom: 0;
  10. left: 0;
  11. background: #015871;
  12. }
  13. .wave {
  14. background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/85486/wave.svg) repeat-x;
  15. position: absolute;
  16. top: -198px;
  17. width: 6400px;
  18. height: 198px;
  19. animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
  20. transform: translate3d(0, 0, 0);
  21. }
  22. .wave:nth-of-type(2) {
  23. top: -175px;
  24. animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) -0.125s infinite, swell 7s ease -1.25s infinite;
  25. opacity: 1;
  26. }
  27. @keyframes wave {
  28. 0% {
  29. margin-left: 0;
  30. }
  31. 100% {
  32. margin-left: -1600px;
  33. }
  34. }
  35. @keyframes swell {
  36. 0%, 100% {
  37. transform: translate3d(0, -25px, 0);
  38. }
  39. 50% {
  40. transform: translate3d(0, 5px, 0);
  41. }
  42. }