Play and Pause in Infinite Slider with CSS Only

Поділитися
Вставка
  • Опубліковано 10 січ 2025

КОМЕНТАРІ • 246

  • @lundeveloper
    @lundeveloper  7 місяців тому +20

    An interesting idea with just CSS, this video will also help everyone know how to code simpler, cleaner and more optimal.
    Please subscribe to watch many interesting videos every day

    • @leoleo-nf3zu
      @leoleo-nf3zu 6 місяців тому

      I’m new to coding so can anyone tell me why use - - width etc instead of just width?

    • @kad6448
      @kad6448 5 місяців тому

      @@leoleo-nf3zu I know its late and you may have probably learned this , but , anything given with a preceding -- is declared as a variable. which means u can give any name , so that "width" , is just a name . For example if you initialise a variable --newvariable = 200px , and you give that value for width= var(--newvariable ) ; height =var(--newvariable ) ; the element will have a width and height of 200px .

    • @callmebroh
      @callmebroh 2 місяці тому

      broh how can i controll the gaps in img?

  • @theether5993
    @theether5993 6 місяців тому +75

    Idk but man this guy teach css way better than anyone. He explains the concept, mathematical understanding of that implementation and basic thing too. Hats off man

    • @lundeveloper
      @lundeveloper  6 місяців тому +2

      Thank you very much, looking forward to your support of the channel in the future 😍

  • @yut0032387
    @yut0032387 6 місяців тому +21

    Your css skill is unmatched. I'm impressed.

  • @AJINVR-
    @AJINVR- 7 місяців тому +17

    Bro's channel is a treasure for developers

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      Thank you very much, I hope my videos are useful

  • @lundeveloper
    @lundeveloper  7 місяців тому +23

    Please give your suggestions for the topic in the next video 😍❤❤

    • @savagemotiv
      @savagemotiv 7 місяців тому +1

      We need more unique hero section designs

    • @muthukumar604
      @muthukumar604 7 місяців тому

      Reddit comment section

    • @calvintai8950
      @calvintai8950 7 місяців тому

      can you make a part two for this video where on hover it doesn't only pause the animation, but also allows the user to scroll the list? Then, on unhover, the animation continues. Similar to how Perplexity's mobile app works.

    • @luizarnoldchavezburgos3638
      @luizarnoldchavezburgos3638 7 місяців тому

      Is there any possibility to see all the images when you load?

    • @matiasromera330
      @matiasromera330 6 місяців тому

      May you explain how to implement scroll drawing in a landing page? it's an interesting effect you can achieve drawing a svg image with the completion percentaje

  • @tiffari8259
    @tiffari8259 7 місяців тому +18

    I'm a beginner and still learning. I find this really useful and it's really good. Keep up the content!

  • @hlulaniisaacritshuri5354
    @hlulaniisaacritshuri5354 7 місяців тому +19

    Your coding style is always straightforward. I have gained knowledge from your tutorials. Continue the great work bro!!😅❤️‍🔥

    • @lundeveloper
      @lundeveloper  7 місяців тому

      Yeah, thank you so much bro 😍😍

  • @ariesrabbit
    @ariesrabbit 3 місяці тому +3

    your knowledge just deep dive about css, and simply explain everything, that awesome

  • @simranpreetkaur3161
    @simranpreetkaur3161 5 місяців тому +1

    @lundevloper you are amazing. I was working with CSS last from 3 years but I never saw type of CSS work. Now I learn CSS again with you. I am so glad, I got your videos on YT. a big big big thanks ! Keep it up. Thanku Very Much

  • @ZakariaTEKNIS
    @ZakariaTEKNIS 6 місяців тому +4

    I FREAKING LOVE THIS CHANNEL! Great solutions, easy to implement and understand and they're reusable to top it off. Also, CSS is amazing! I had no I idea it could do all of this, they should call it JavaCSS with all the logic it handles. LOL!

  • @Shortcutat-2.0
    @Shortcutat-2.0 19 днів тому

    bro no one here like you in you tube (Your content is mind blowing )

  • @Ezekiel889
    @Ezekiel889 7 місяців тому +2

    for me, that's one of the best tutorial channels about web dev on youtube...love it... keep doing what you do

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      Thank you so much bro 🥹🥹

  • @ahmedtkito830
    @ahmedtkito830 9 днів тому

    This is the first time I’ve commented on a UA-cam video. You are incredibly brilliant. 🚀🤯

  • @bhaveshxrawat
    @bhaveshxrawat 7 місяців тому +22

    Using offset properties like 'left' is not optimal as it forces the browser to repaint the elements which is a demanding task, low-end devices might make the animation look choppy. Conder using translate property.

    • @Tormentor60
      @Tormentor60 6 місяців тому

      And also there is 0 control over the gap between the items. I have version with translate instead of left, and with customizable gap. I can't paste link on here, but if anyone is interested you can find me on codepen, username: EntropyReversed
      Pen name: Infinite CSS Scroll

  • @Trendi_Vibes
    @Trendi_Vibes 21 день тому

    Bro, you are true master of css

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

    you are completely awesome... first time i am saying this to any developer

  • @chickennuggies0242
    @chickennuggies0242 7 місяців тому +2

    It’s 2am, I should be going to bed but your content is so good. Thank you for sharing your knowledge!

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      Wao. Thank you so much 😍😍😍

  • @ModderorWot-ci1zj
    @ModderorWot-ci1zj 5 місяців тому +1

    bro you got in my recommendation from couple of weeks and I was watching and learning from your random videos mostly of 'CSS Only' stuff and yeah I subed today , I can say that you explain CSS way better then anyone including basics , math behind , and logic and code structure soo well , I would love a proper video by you on topic of explaination of code , like you doo....

  • @Jim49267
    @Jim49267 7 місяців тому +4

    I understood the video without translation. Your English is beautiful.

  • @PicSta
    @PicSta 6 місяців тому +1

    Best explained infinite slider on UA-cam. I've seen a lot of them, so I can truly say that. If I had to give you a star rating where 5 is max., then you would get only a 4 because you missed out using a speed variable to adjust speed in the style-attribute. This is helpful to adjust speed accordingly to your item count. For instance, 10s for 100 items will look way different from 10 items. Keep up this good and high quality work, you will make your way. chúc may mắn

  • @a062693069
    @a062693069 7 місяців тому +1

    Using mask-image to fade-in fade-out items is amazing!

  • @stormterminatorx9951
    @stormterminatorx9951 5 місяців тому

    Just too good!!! I really hope you make a full stack project series or something like that ....your AI explanations are better than many youtubers or courses....just subscribed!!!!

  • @timothyharrison5105
    @timothyharrison5105 7 місяців тому

    Wow... I just tried recreating this project.
    It became clear that I really don't know much about CSS. I'm going back to learn. Especially on working calculations within CSS.

  • @RonnieMbugua
    @RonnieMbugua 5 місяців тому

    You are amazing at this! Never stop, this is true value🙌🏽 The Mr. Beat voice is a nice touch too! It makes everything feel easy to absorb

  • @matiasromera330
    @matiasromera330 6 місяців тому +1

    O M G!! amazing css master I just found!

  • @WillM-k9p
    @WillM-k9p 5 місяців тому

    You earned a new subscriber! AI voice or not your CSS explanation is 🔥, so glad I found this channel! Thank you!

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

    Your video are so awesome.easily understandable.the animation always works.

  • @iBbeenon0piumforthelast10days
    @iBbeenon0piumforthelast10days 6 місяців тому

    best channel explaining css, exited to see more content from u
    and thanks for posting the codes

  • @Way_Of_The_Light
    @Way_Of_The_Light 6 місяців тому +1

    Sick!! So glad I discovered your channel 🙌

  • @basharh6763
    @basharh6763 7 місяців тому +1

    slider with CSS only is insane, keep up the good work 😍

  • @niazhimselfangels
    @niazhimselfangels 5 місяців тому

    Mind-blowing stuff! 🎉🎉 Thank you for taking time to create beautiful designs and share your wisdom! ☺️

  • @PragneshPatel-g5d
    @PragneshPatel-g5d 2 місяці тому

    I am impressed with this mathematical trick with CSS.
    Keep going, keep making videos like this. 😅👌❤🙌

  • @HarshDoes
    @HarshDoes 7 місяців тому +3

    This guy is a gem💎
    Protect him at any cost.

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

    this content is another level 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩

  • @keitho6974
    @keitho6974 6 місяців тому

    Your stuff is awesome. Been sharing it with other dev friends of mine.

  • @darkalpha2107
    @darkalpha2107 4 місяці тому

    Damnnnn man! That was an amazing one. Love the way you explained it ❤ (and u got urself one more subscriber hehe)

    • @lundeveloper
      @lundeveloper  4 місяці тому

      Thank you,I'm glad it was helpful ❤

  • @abrowndude
    @abrowndude 6 місяців тому

    very useful thank you for making these css only videos please make more!

  • @DavidGutierrez-dj2kk
    @DavidGutierrez-dj2kk 4 місяці тому

    You are an amazing teacher!

  • @SEUNGTAEKKIM
    @SEUNGTAEKKIM 4 місяці тому

    Your css skill is amazing!!!
    Recommand translate than left

  • @muhammadmoiz4249
    @muhammadmoiz4249 3 місяці тому

    Love your coding style, want a video on making a infinite scrolling marquee {text and icon, image only}

  • @bhaveshxrawat
    @bhaveshxrawat 7 місяців тому +4

    we have got Mr. Beast of Dev world

  • @robertwallace5498
    @robertwallace5498 6 місяців тому

    You have the most impressive and useful css skills

  • @szaboistvan369
    @szaboistvan369 6 місяців тому +1

    Awesome approach. A few thoughts:
    - It can be handy to put the speed into an optional variable as well
    - Was wondering if the reverse could be solved with a direction variable with a bit of math without duplicating the animations
    - Would feel more complete if we can get rid of the white space when starting... though I guess this is a bit tricky because of the animation delay

    • @lundeveloper
      @lundeveloper  6 місяців тому +1

      Of course, Everything can be solved with mathematics

    • @lulufv
      @lulufv 6 місяців тому +5

      Regarding the white space, my solution was to subtract the number of items in the animation-delay line, instead of just 1, so mine looks like this:
      animation-delay: calc((10s / var(--quantity)) * (var(--position) - var(--quantity)));
      I don't know if it works on all cases but even if it doesn't, it might help

    • @jeisongarzon6066
      @jeisongarzon6066 5 місяців тому

      @@lulufv It worked ty bro !

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

      @@lulufv I just knew i will find this in comments, thanks

  • @jean-marcfraisse7191
    @jean-marcfraisse7191 4 місяці тому +1

    Very nice tutorial and explanations! Your videos are excellent.
    I was wondering: wouldn't "animation-direction: reverse;" work and be enough in the reverse situation? 🤔

  • @exotreus
    @exotreus 7 місяців тому

    Amazing tutorials so far bro, but I'm really interested in that title changing fill and color depending on the image under it. I'd love at least a short about how you can recreate that

    • @lundeveloper
      @lundeveloper  7 місяців тому

      Thank you so much, I will guide about it in the next video

    • @exotreus
      @exotreus 7 місяців тому

      @@lundeveloper Actually, you could stretch it to your usual vid length by just making a general video on interesting masks like this one. It's a great website feature, and I am sure that not only I will really appreciate it.

  • @meladthegreat
    @meladthegreat 3 місяці тому +1

    Same idea but with a carousel that have checkboxes right and left to slide the content and minimized view with magnifying hover effect(not necessary)❤

  • @MrTweaksGaming
    @MrTweaksGaming 4 місяці тому

    you r the great bro. Start a CSS course man.

  • @learnweb585
    @learnweb585 6 місяців тому

    awesome work brother

  • @mdan.___
    @mdan.___ 7 місяців тому

    very good in explaining your code 🤩

  • @robertodepasamonte3434
    @robertodepasamonte3434 7 місяців тому

    Very novel approach to creating an infinite slider or marque effect. Thanks for sharing. A couple of questions: (1) how can one incorporate a variable to easily set the speed of the slider? and (2) how can automatically scale the size of the images (perhaps using the calc() function) to accommodate changing viewport sizes?

    • @lundeveloper
      @lundeveloper  7 місяців тому

      1. If you need to change the speed with a variable, you just need to create an additional --time variable like I did with quantity, then in the css, replace 10s with var(--time). 2. This slider, when you change the wifth for each different screen, will shrink itself without you needing to edit anything further.

  • @3bta
    @3bta 4 місяці тому

    Thank you so much for the lesson❤

  • @frnjtt-pn6wj
    @frnjtt-pn6wj 6 місяців тому

    Great technique! Thank you for the great content❤What you think about making a video to show the responsiveness side?

  • @alexon2010
    @alexon2010 5 місяців тому

    The video is sensational, you could make a video of this with React and styled-components, to see how it would look... What would it be like if the person used the cell phone and did the manual interaction at some point?

  • @HAMZANADEEM-v4t
    @HAMZANADEEM-v4t 5 місяців тому +2

    I want a complete course on CSS animations and design as like you do in your videos. Can you please provide it?

  • @luisdavidmartinezfundora8224
    @luisdavidmartinezfundora8224 3 місяці тому

    Man you are just amazing, how do you learn all this stuff

  • @andyl9920
    @andyl9920 7 місяців тому

    Declaring reverse and adding var sounds like JS to me. But what do i know i aint no expert. Still learning. Learned something new today for CSS

  • @ajibolagenius
    @ajibolagenius 6 місяців тому

    blown 🤯🤯🤯 I'd also appreciate if you can share your VS Code extensions with us.

  • @MdSaad-m7m
    @MdSaad-m7m 4 місяці тому +2

    Bro, you're awesome. But I want to know how do make the animation start from the left:0; I mean when the animation starts there is big blank space. It doesn't look good to me.

    • @raphischnell
      @raphischnell 3 місяці тому

      That is what i am wondering too!

  • @shaleen9434
    @shaleen9434 6 місяців тому +2

    Hey i was working on a Marquee which is controlled by scroll event.Now the marquee will move to peft slide if the srcoll deltaY is +ve and vice versa,the only problem is that if the user scroll from +ve to -ve is changing the animation but i don't want the animation to stsrt again from the beginning rather i want the animation to start from where it ended.Please do you have any solution?

  • @FPI23
    @FPI23 3 місяці тому

    Its like finding a formula to cure cancer.

  • @user-hm1ld3bg3g
    @user-hm1ld3bg3g 7 місяців тому

    Great work and explanation🥰🥰

  • @hdlrpnzr
    @hdlrpnzr 7 місяців тому

    Gracias por compartir tus conocimientos Lun

  • @loulou81400
    @loulou81400 6 місяців тому

    Hello !! What a tutorial, realy cool !!
    Where do you find all your nice images?

  • @lazy-hero.
    @lazy-hero. 6 місяців тому

    Superb content

  • @surij8376
    @surij8376 6 місяців тому

    Please also share how you get your design resources. Do you design it yourself? If so please do make tutorials on that as well.

  • @WuToriToriwu
    @WuToriToriwu 6 місяців тому

    Very helpful!

  • @julianvelandia1668
    @julianvelandia1668 6 місяців тому

    I loved this idea

  • @CosmacCreation
    @CosmacCreation 5 місяців тому

    Best video bro , just wanna know some card animation if you can taught us❤

  • @HowTO-lq7pg
    @HowTO-lq7pg 6 місяців тому

    Great work

  • @niccc.c-x8d
    @niccc.c-x8d 6 місяців тому

    this was really good

  • @i33o7dot9
    @i33o7dot9 7 місяців тому

    thanks Mr. Beast for this tutorial

  • @MrSofazocker
    @MrSofazocker 6 місяців тому +1

    Ho can I have all items of the slider be visible immediately on page load, instead of them first animating in from the left and then repeating?

  • @Ghs-v9l
    @Ghs-v9l 2 місяці тому

    at 12:11, same thing i'm trying with the right instead of left, but unfortunately it didn't work. why?
    please help! 😶‍🌫

  • @zubae_afroze
    @zubae_afroze 3 місяці тому

    Yohoho Puzzle pirates sounds lol

  • @blackweb-1403
    @blackweb-1403 6 місяців тому

    you are pro player of Css😅😅

  • @farhanstack
    @farhanstack 7 місяців тому

    Thank You Lun DEV.

  • @TheCoder-u4q
    @TheCoder-u4q 7 місяців тому

    Impressive 😊

  • @user-notfound616
    @user-notfound616 День тому +1

    DUDEEEE PLS MAKE A COURSE

  • @neverold6781
    @neverold6781 6 місяців тому

    Great 👍🏼😃

  • @TheGamer-zq6xs
    @TheGamer-zq6xs 4 місяці тому

    I never understood css that easy

  • @ARLIH2007
    @ARLIH2007 4 місяці тому +1

    How to control the gap between each items, I want to make the gap smaller

  • @GiuseppeMinisteriofswing
    @GiuseppeMinisteriofswing 4 місяці тому

    Why not just define only the animation-name for the reverse slider?
    I am also wondering if just setting the animation-direction to reverse wouldn't do the job.
    Anyway, great content!

  • @jmr1920
    @jmr1920 7 місяців тому +2

    can you make a video mastering css grid and flex box?

  • @iamsomewhere
    @iamsomewhere 5 місяців тому +1

    The fact that you don't put a space between your selectors/property declarations and your opening curly brace { absolutely kills me. 😵

  • @pedroriveralopez8566
    @pedroriveralopez8566 7 місяців тому

    Amazing bro!
    How you do that hero with the letters in transparency with the image?
    or its only a complete image?

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      Hello everyone, please watch the latest video I posted recently. I guided everyone to create it

  • @ntloc1964
    @ntloc1964 7 місяців тому

    Ủa cái này là a nói đó hả, xịn thật sự

  • @okon1624
    @okon1624 7 місяців тому

    thanks for the lecture, but is difficult to comprehend

  • @anonymous_basics
    @anonymous_basics 3 місяці тому

    nice video thanks

  • @miladganjali1440
    @miladganjali1440 7 місяців тому +4

    I really like your contents but please change the AI voice to someone else Mr. Beast's voice is for kids and entertainment most of your viewers are working-class

  • @lakshaychauhan9190
    @lakshaychauhan9190 7 місяців тому

    good tutorial ! I have a few question regarding these infinite animations - how much of such can we use in a site and where in js engine or browser are these run ? where do theh get memory allocated etc I want to know details what to look ?

  • @spdomingoo
    @spdomingoo 2 місяці тому

    How does this work if the images have different widths? Say displaying a carousel of mobile screens and desktop screens, they can have the same heights but how would it work with width?

  • @hamidiqbal1772
    @hamidiqbal1772 2 місяці тому

    i have a task assigned similar to this, but in that the animation is from top to bottom, it is actually in a dashboard and the other thing is the dynamic and coming from an API, so how will i position it?

  • @jagritmondal8144
    @jagritmondal8144 5 місяців тому

    can you please teach me how to create a background shifting effect when we hover over a particular image of a slider? when we hover over a particular image , the hero section must change its background , which is the same background as in the slider. I just got this idea while watching this video, and tried but... not working. please help me.

  • @coderoyalty
    @coderoyalty 7 місяців тому +1

    quality: 1000%

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      You should not do so, because it will cause the distance of the items to be very far apart.

    • @coderoyalty
      @coderoyalty 7 місяців тому

      @@lundeveloper ooh,,, was rating your tutorial...

  • @ahmedghallap-k9x
    @ahmedghallap-k9x 23 дні тому

    شكرا لقد كان رائعا

  • @samuelmovies1289
    @samuelmovies1289 7 місяців тому +2

    how did you do that ? the text and image in backdround only the face part text is lighten and only showing text border
    text border

    • @lundeveloper
      @lundeveloper  7 місяців тому +1

      I created two identical texts, the black text is behind the image, and the border-only text is in front of the image.

    • @samuelmovies1289
      @samuelmovies1289 7 місяців тому

      @@lundeveloper do you have any tutorial for that

  • @nichtsooft
    @nichtsooft 3 місяці тому

    Great approach!
    BUT: What if the list-items do not have the same width? 🤔

    • @nichtsooft
      @nichtsooft 3 місяці тому

      I guess in that case I need to put all items in a flex-box and animate that one which should automaticly reduce the mathematical effort. Right?

  • @rahul9704
    @rahul9704 6 місяців тому

    What if you wanted to have all items visible on first load, and not moving in from the right the first time?

  • @jee0806
    @jee0806 6 місяців тому

    hay @lundeveloper man your tutorial is good .but i wanted to add text instead of jpg , i try to do it but sometimes text goes to new line as its length is long i try to ply with other properties but nothing happens, can you tell me what should i change so that i can use text instead of image

  • @jaktojestzajeta
    @jaktojestzajeta 6 місяців тому

    Please. Could you make it so the slider is not empty at the page refresh? I think it would be better if the photos were visible at start