Simple Trick for Infinite Marquee with Swiper.js

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 15

  • @kevynlevine
    @kevynlevine Місяць тому +5

    Raw dogging is my favorite way to do everything, in Webflow. Great video - thank you!

    • @webbae
      @webbae  Місяць тому

      sometimes you gotta be quick with it.

  • @alyssa_bananas
    @alyssa_bananas Місяць тому +2

    Definitely cloning this! I use SwiperJS all the time but just couldn't figure out how to do a smooth marquee! Thanks for this

    • @webbae
      @webbae  Місяць тому

      overriding the timing transition func was the key for me. I feel like swiper should expose that as an option in the JS API....

  • @Wasgehtdichdasan16
    @Wasgehtdichdasan16 Місяць тому +2

    How would you make the gap even betweeen differen size logos?

    • @webbae
      @webbae  Місяць тому

      you could use slidesPerView not on auto for that. You could also get more fine-grained control by adding combo classes like "is-small" or "is-brand-x" and provide granular styles that way.

  • @johanvanwambeke723
    @johanvanwambeke723 Місяць тому +1

    What do you think are the advantages of doing it this way?

    • @webbae
      @webbae  Місяць тому

      extensibility - what if we wanted to speed up/down based on scroll? What if we wanted the user to be able to interact with the logo garden somehow? etc. Hope that helps!

  • @Binyamin1444
    @Binyamin1444 Місяць тому +1

    Great stuff but why wouldn’t we just use css only marquees? For better page speeds..

    • @webbae
      @webbae  Місяць тому +1

      Some folks have reported css marquees glitch when you have certain content in there. I’ve never had any major problems with them though.
      Created a logo slider from swiped could also provide a lot of extensibility if you want something more interactive like change speed on scroll or something like that.

    • @Binyamin1444
      @Binyamin1444 Місяць тому

      @@webbaeah cool makes sense. Keep up the good work

  • @heatherliu6856
    @heatherliu6856 Місяць тому +1

    Developers don’t want you to know this one simple trick….

    • @webbae
      @webbae  Місяць тому

      But I got a whole bag of 'em...

  • @surendarr2177
    @surendarr2177 Місяць тому +1

    🤩🤩🤩