jamescolin

Vagues pour séparer les sections dans SystemeIO

Feb 3rd, 2022 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.64 KB | None | 0 0
  1. <!--
  2. Copier-coller ça dans un élement HTML pour faire une transition d'une section à une autre avec des vagues
  3. :: Profitez de mon offre SystemeIO si vous n'êtes pas un abruti fini : https://le.systeme.io/monoffre
  4. -->
  5. <svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  6. viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
  7. <defs>
  8. <path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
  9. </defs>
  10. <g class="parallax">
  11. <use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(255,255,255,0.7" />
  12. <use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(255,255,255,0.5)" />
  13. <use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(255,255,255,0.3)" />
  14. <use xlink:href="#gentle-wave" x="48" y="7" fill="rgba(255,255,255,1)" />
  15. </g>
  16. </svg>
  17. <style>
  18.   .waves {
  19.   position:relative;
  20.   width: 100%;
  21.   height:15vh;
  22.   margin-bottom:-7px;
  23.   min-height:100px;
  24.   max-height:150px;
  25. }
  26. .parallax > use {
  27.   animation: move-forever 25s cubic-bezier(.55,.5,.45,.5)     infinite;
  28. }
  29. .parallax > use:nth-child(1) {
  30.   animation-delay: -2s;
  31.   animation-duration: 7s;
  32. }
  33. .parallax > use:nth-child(2) {
  34.   animation-delay: -3s;
  35.   animation-duration: 10s;
  36. }
  37. .parallax > use:nth-child(3) {
  38.   animation-delay: -4s;
  39.   animation-duration: 13s;
  40. }
  41. .parallax > use:nth-child(4) {
  42.   animation-delay: -5s;
  43.   animation-duration: 20s;
  44. }
  45. @keyframes move-forever {
  46.   0% {
  47.    transform: translate3d(-90px,0,0);
  48.   }
  49.   100% {
  50.     transform: translate3d(85px,0,0);
  51.   }
  52. }
  53.  
  54. @media (max-width: 768px) {
  55.   .waves {
  56.     height:40px;
  57.     min-height:40px;
  58.   }
  59. }
  60. </style>
Add Comment
Please, Sign In to add comment