wave.css 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. font-family: "Nunito", sans-serif;
  5. }
  6. .ocean {
  7. height: 5%;
  8. width: 100%;
  9. position: absolute;
  10. bottom: 0;
  11. left: 0;
  12. background: #015871;
  13. }
  14. .wave {
  15. background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/85486/wave.svg) repeat-x;
  16. position: absolute;
  17. top: -198px;
  18. width: 6400px;
  19. height: 198px;
  20. animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
  21. transform: translate3d(0, 0, 0);
  22. }
  23. .wave:nth-of-type(2) {
  24. top: -175px;
  25. animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) -0.125s infinite, swell 7s ease -1.25s infinite;
  26. opacity: 1;
  27. }
  28. @keyframes wave {
  29. 0% {
  30. margin-left: 0;
  31. }
  32. 100% {
  33. margin-left: -1600px;
  34. }
  35. }
  36. @keyframes swell {
  37. 0%, 100% {
  38. transform: translate3d(0, -25px, 0);
  39. }
  40. 50% {
  41. transform: translate3d(0, 5px, 0);
  42. }
  43. }