Awesome Dark Carousel Slider in HTML & CSS | Carousel for Card Slider or Image Slider

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ค. 2024
  • 🎬 Awesome Dark Carousel Slider in HTML & CSS | Carousel for Card Slider or Image Slider
    Hi there!
    Mathe here and in this video we are going to create an amazing Dark Carousel Slider. Whether to make an Image Slider or a Card Slider, this video helps you to get that carousel slider effect like where each slide is given a position when another slide is showing as the main one - the carousel slider is a great way to present information dynamically and interactively.
    In this video we create the Carousel Slider using HTML and CSS.
    👍 If You Enjoy This Video, Consider Hitting The Like Button!
    🥁 Subscribe To Stay Notified For New Videos: / @mathe.creative
    🌟 The "Front-end for Beginners" EBOOK is now available! High quality content, check it out now:
    / shop
    [SOURCE CODE]
    Available to members:
    --- Patreon:
    🌟 / mathecreative
    Timestamps
    00:00:00 - Demo
    00:00:39 - Base HTML Structure for a Card Slide
    00:02:35 - Replicating the Slides
    00:04:05 - CSS Base for Carousel Behavior
    00:07:05 - Card Styling
    00:14:15 - Dreams come true
    keywors:
    card slider
    image slider
    card slider in html css
    card slider html css
    card slider html css only
    card slider using html css
    card slider html and css
    how to make card slider in html and css
    carousel html css only
    carousel slider html css
    card carousel html css
    how to make card
    how to make card html css
    card slider html
    carousel design
    card slider html u0026 css
    image slider html css
    image slider css
    carousel image slider
    css card design
    html css
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 71

  • @mathe.creative
    @mathe.creative  ปีที่แล้ว +4

    Hi again!
    Learn, share, enjoy and develop guys! ✌
    Get access to all Mathe. Creative features: www.patreon.com/MatheCreative

  • @hackerprime9722
    @hackerprime9722 ปีที่แล้ว +4

    This is what I was looking for! Keep up the good work!

  • @cachemoney8825
    @cachemoney8825 ปีที่แล้ว +2

    This is really great stuff thank you for sharing ! You should make more content like this!

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      I'm very happy that you liked it 🫡

  • @abhishekjain7541
    @abhishekjain7541 ปีที่แล้ว +1

    THE BEST WORK AND THE CLEANEST CODES GREAT WORK DUDE HELPED ME A LOT

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      Thanks for the compliments and glad I could help :)

  • @joseluisbecerra3855
    @joseluisbecerra3855 11 หลายเดือนก่อน +2

    I really appreciate it, it really helped a lot!!!

    • @mathe.creative
      @mathe.creative  11 หลายเดือนก่อน

      I'm happy to have helped you 🙂

  • @mdkawsarislamyeasin4040
    @mdkawsarislamyeasin4040 ปีที่แล้ว +1

    Thanks for the video
    and mostly for the source code

  • @sahilsharma2867
    @sahilsharma2867 11 หลายเดือนก่อน +1

    perfect! good one

    • @mathe.creative
      @mathe.creative  11 หลายเดือนก่อน

      I appreciate the compliments, bro 😀

  • @xiztspike81
    @xiztspike81 2 หลายเดือนก่อน +1

    thanks so much! 😍💯

    • @mathe.creative
      @mathe.creative  2 หลายเดือนก่อน +1

      You're welcome 😉

  • @shohruxshokirov7237
    @shohruxshokirov7237 ปีที่แล้ว +1

    just WOW 👏

  • @user-mv5xf6rz3k
    @user-mv5xf6rz3k ปีที่แล้ว +1

    Thanks, this is a good vide

  • @ahmedabdelmeguid1131
    @ahmedabdelmeguid1131 ปีที่แล้ว +1

    perfect

  • @thewojack
    @thewojack ปีที่แล้ว +1

    very useful

  • @mrz4237
    @mrz4237 ปีที่แล้ว +1

    👏👏👏

  • @Natural-Pigeon
    @Natural-Pigeon 11 หลายเดือนก่อน +1

    you are greet bro
    ❤❤❤

  • @leandrohenrique6056
    @leandrohenrique6056 8 หลายเดือนก่อน +1

    ❤💪🏻😊

  • @alixone6668
    @alixone6668 7 หลายเดือนก่อน +1

    hello.the size of the cards covers the whole screen. How can I make the cards smaller?

    • @mathe.creative
      @mathe.creative  7 หลายเดือนก่อน

      Hit here!
      In the styles.css file, on line 37, we set the height and width of the card container - you can change it there. Alternatively, you can adjust it directly on the cards at line 58. If you have any more questions, just ask here, and either I or someone from the community will be happy to help you :)

  • @mudassirrehman1317
    @mudassirrehman1317 ปีที่แล้ว +2

    hello. hope you doing well. how can we add time delay instead of clicking.i mean auto carousel in thise example. please replay must

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว +1

      Hi there, Mudassir!
      Goood question, this would make the slider much more dynamic actually. But I think it would require some javascript so it wouldn't be very simple.
      I wrote it down here to make a video about it and I'll research it, if I find a quick solution I'll come back here and pass it on to you, ok?
      Thanks for commenting man :)

    • @mudassirrehman1317
      @mudassirrehman1317 ปีที่แล้ว +1

      @@mathe.creative thanks for you valuable words I am waiting for that. keep it up

  • @playAliMusic
    @playAliMusic 10 หลายเดือนก่อน +1

    Hey, I used the source code and everything works fine, but I'm getting this blue box/container behind all of the cards, it seems to appear only when I add the .cards in the CSS. But I can't get rid of the .cards otherwise they don't go to the right part of the page. How would I get rid of this blue box?
    UPDATE: I found what is causing it, it's the width. If I get rid of the width it will get rid of the box, but the cards will now show all the way to the right side of the screen, and attempting to move them back makes the box appear again. (with width and margin right/left). Would still love some help if you got any

    • @mathe.creative
      @mathe.creative  10 หลายเดือนก่อน

      Hi there!
      Well, let's try to solve this little problem. First, as you mentioned about the cards being on the right, make sure you've made the adjustment I do at 13:03, ok?
      If the problem persists, I would need more details about this "blue container" that is appearing. If you prefer, you can send me an email with prints (it is available in the "About" tab here on the channel).
      I hope it works and if not, just contact me :)

  • @ayushmurugkar4657
    @ayushmurugkar4657 4 หลายเดือนก่อน +1

    Hi!
    Hi I am trying just the card scrolling using html and css only!
    but I am not able to get any behaviour using
    #s1:checked~ .cards #slide3{
    transform:scale(1.2)
    }
    What am I doing wrong?
    I made sure everything is structured as in the video like each label is assigned perfectly for the radio button and each label has an slide id and card and an image within it
    please help

    • @mathe.creative
      @mathe.creative  4 หลายเดือนก่อน

      Hi there!
      I will try to help you, don't worry.
      So, your css declaration is apparently correct, what it expresses is "when the box with id s1 is checked then the element with id slider3 inside the .cards must have this style".
      Therefore, I believe the problem is possibly in your html, in the organization of the elements. Check it out and get back to me, the checkbox entries must be siblings of the elements that have the .cards class. Did you get it?

    • @ayushmurugkar4657
      @ayushmurugkar4657 4 หลายเดือนก่อน +1

      Thank you for kind response!
      Actually, it was resolved as soon as I realised I was putting an extra comma after #slide,{ and it should be #slide{
      Thanks again

    • @mathe.creative
      @mathe.creative  4 หลายเดือนก่อน

      @ayushmurugkar4657 Oh yes, it doesn't really work 😅
      Glad it went right!

  • @Gaurav009
    @Gaurav009 ปีที่แล้ว +1

    Hi, cards are toggled on click, can you please tell codes to toggle the cards on touchscreen swipe??
    Please, must reply.

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      Hi brother!
      I'm sorry but I believe that putting the codes here in the comments may confuse you or be too much, but don't worry, I intend to make other videos about sliders this time using the SwiperJs and SlickJs libraries, I'm going to write it down here with me to solve the touch problem, ok?

    • @Gaurav009
      @Gaurav009 ปีที่แล้ว

      @@mathe.creative okk.
      But please make it soon.

  • @raginiragini5734
    @raginiragini5734 10 หลายเดือนก่อน +1

    slide is not getting added . even thought i have worte css for every one . please help me

    • @mathe.creative
      @mathe.creative  10 หลายเดือนก่อน

      Hello!
      In the description of the video there is the source code (relax, it's free), could you test it based on it?
      I hope it helps :)

  • @blackmetal616
    @blackmetal616 ปีที่แล้ว +1

    how could i make this work with just 4 cards?

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      Hi there!
      So, you would need to adapt the html for four card entries (that inputs and labels).
      After that, edit the css that starts here 4:46, with the same logic of adapting to 4 cards and not 5 more.
      I hope it helped you :)

  • @pietromalvagi113
    @pietromalvagi113 3 หลายเดือนก่อน +1

    Hi man, I tried to send you an e-mail some days ago at the address I found in the comments below, idk if you didn't read it or if you don't have time but just letting you know😊

    • @mathe.creative
      @mathe.creative  3 หลายเดือนก่อน +1

      hello!
      I checked my email and your message automatically went to spam 🤦‍♂️, sorry, that's why I prefer a Patreon DM haha.
      I'll take the opportunity to see what you need and answer you, if possible by today, don't worry.

  • @guidsz
    @guidsz 3 หลายเดือนก่อน +1

    someone knows a community where people help others with html and css stuff?

    • @mathe.creative
      @mathe.creative  2 หลายเดือนก่อน

      Olá, Guilherme! Estou criando uma comunidade lá no Patreon, caso tenha interesse.
      Lá voce também pode ser um membro free, gostaria de ter voce por lá. cara.
      Já te adiantando, pretendo disponibilizar por tempo limitado o ebook sobre Front-end Edição 1 para os free members assim que eu lançar a Edição 2, então fique atento, dev :)
      www.patreon.com/MatheCreative

  • @kitagaming5945
    @kitagaming5945 ปีที่แล้ว +2

    how to make this card slider responsive? thats checked css make me failed :(

    • @mathe.creative
      @mathe.creative  11 หลายเดือนก่อน

      For the mobile version I think we could only display 3 cards instead of 5, we would do that using CSS media queries, what do you think?

  • @cesarsanchez1722
    @cesarsanchez1722 11 หลายเดือนก่อน +1

    Responsive?

    • @mathe.creative
      @mathe.creative  10 หลายเดือนก่อน

      Hi!
      For the mobile version I think we could only display 3 cards instead of 5, we would do that using CSS media queries. Hope this helps

  • @ramanmadhukar6083
    @ramanmadhukar6083 ปีที่แล้ว +1

    how to make it autoplay

    • @mathe.creative
      @mathe.creative  11 หลายเดือนก่อน

      Hi there!
      Good question, this would make the slider much more dynamic actually. But I think it would require some javascript so it wouldn't be very simple.
      I wrote it down here to make a video about it, ok?
      Thanks for commenting :)

  • @whitesky8013
    @whitesky8013 ปีที่แล้ว +1

    When you hide things out thats where it makes confusing

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      Hello, I didn't quite understand where you found difficulty, maybe if you explain it to me in more detail I can help you, as I helped other people :)

    • @whitesky8013
      @whitesky8013 ปีที่แล้ว

      @@mathe.creative if i have an already navigation bar is it ok if i add this would it messed up my current work?

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      @@whitesky8013 Well, I don't see any reason for this slider to damage your navbar, they are distinct elements. Test it out and see what happens, if there is any issue, you can send me an email with more details and I'll help you resolve it 🙂

    • @youaremad1736
      @youaremad1736 ปีที่แล้ว

      @@mathe.creative are you willing to style a website for me? I would pay. Thing is I coded the back end using Django, but I suck so bad when it comes to UX/UI, my websites never look professional

  • @samsonnathanielr.9304
    @samsonnathanielr.9304 ปีที่แล้ว +1

    Can you send me the entire css? I have copied your css thrice but the card still not working :(

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว

      Hey, bro!
      Source codes are on Patreon (www.patreon.com/MatheCreative) :)

  • @breechcomet9724
    @breechcomet9724 ปีที่แล้ว +2

    great tutorial i liked and subscribed aswell actually helping me more with front end, by the way i practiced this with 5 cards and was able to get similar results but when i tried it with 6 cards it became a mess can you help here is my code I did play around with yours so do bear in mind it'll look weird. but here is the css code:
    #s1:checked~.cards #slide5,
    #s2:checked~.cards #slide6,
    #s3:checked~.cards #slide1,
    #s4:checked~.cards #slide2,
    #s5:checked~.cards #slide3,
    #s6:checked~.cards #slide4 {
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(-70%, 0, -220px);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }
    #s1:checked~.cards #slide6,
    #s2:checked~.cards #slide1,
    #s3:checked~.cards #slide2,
    #s4:checked~.cards #slide3,
    #s5:checked~.cards #slide4
    #s6:checked~.cards #slide5 {
    box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(-35%, 0, -120px);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }
    #s1:checked~.cards #slide1,
    #s2:checked~.cards #slide2,
    #s3:checked~.cards #slide3,
    #s4:checked~.cards #slide4,
    #s5:checked~.cards #slide5,
    #s6:checked~.cards #slide6 {
    box-shadow: 0 25px 50px 0 rgba(0, 0, 0, 50%);
    transform: translate3d(0, 0, 0);
    --current-color1: #fad00c;
    --current-color2: #ECEAED;
    }
    #s1:checked~.cards #slide6,
    #s2:checked~.cards #slide5,
    #s3:checked~.cards #slide4,
    #s4:checked~.cards #slide3,
    #s5:checked~.cards #slide2,
    #s6:checked~.cards #slide1 {
    box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(0, 0, 0);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }
    #s1:checked~.cards #slide5,
    #s2:checked~.cards #slide4,
    #s3:checked~.cards #slide3,
    #s4:checked~.cards #slide2,
    #s5:checked~.cards #slide1,
    #s6:checked~.cards #slide6 {
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(35%, 0, -120px);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }
    #s1:checked~.cards #slide4,
    #s2:checked~.cards #slide3,
    #s3:checked~.cards #slide2,
    #s4:checked~.cards #slide1,
    #s5:checked~.cards #slide6,
    #s6:checked~.cards #slide5 {
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(70%, 0, -220px);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }

    • @mathe.creative
      @mathe.creative  11 หลายเดือนก่อน +1

      Hi there!
      First of all, sorry for the delay in responding, TH-cam has hidden your comment from me for some reason. Anyway, we need to remember that this video effect is only valid for an odd number of displayed cards. We could easily have 6 cards in total, but we would only show 5, so far ok?
      Therefore, we would need to have one more declaration of card behavior that would basically look like this:
      #X1:checked~.cards #Y1,
      #X2:checked~.cards #Y2,
      #X3:checked~.cards #Y3,
      #X4:checked~.cards #Y4,
      #X5:checked~.cards #Y5,
      #X5:checked~.cards #Y6 {
      display: none;
      }
      Do you think you can follow? If you prefer, you can send me an email :)
      channel.mathe@gmail.com

  • @MagnanimoTandil
    @MagnanimoTandil ปีที่แล้ว +1

    hello thanks for get us the code. I dont understand this:
    #s1:checked ~ .cards #slide4,
    #s2:checked ~ .cards #slide5,
    #s3:checked ~ .cards #slide1,
    #s4:checked ~ .cards #slide2,
    #s5:checked ~ .cards #slide3 {
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 45%);
    transform: translate3d(-70%, 0, -220px);
    --current-color1: #ECEAED;
    --current-color2: #404457;
    }
    can you explain to me? o maybe in a new video. Regards

    • @mathe.creative
      @mathe.creative  ปีที่แล้ว +3

      Hi there! I can explain yes, or at least try :)
      First the "~" selector means something like "selects every that is preceded by a ", so in our case it's specifying that when the inputX is checked then slideX should receive this styling, got it?
      As we have 5 cards in the video, we need to specify which card will receive this styling when each card is in focus, for example, when card 1 (slide1) is in the center (focus) where silde2 should be, and slide3, and the slide4...
      It takes a little effort to get the hang of it, but then you never forget it, I hope.
      Hope this helps!

    • @MagnanimoTandil
      @MagnanimoTandil ปีที่แล้ว +1

      @@mathe.creative
      Thank you very much for answering. I think I understand it, I'm going to practice it and try to achieve it. Thank you very much and greetings.

    • @esolute
      @esolute ปีที่แล้ว

      @@mathe.creative Thanks a lot ... Please keep doing what you do.
      about the portfolio, I'm interested