CSS Slider: Image Slider with controls using CSS3 Only

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ต.ค. 2024

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

  • @webdecorator6614
    @webdecorator6614  6 ปีที่แล้ว +21

    We can move image automatic by using small JavaScript on code.
    follow the link for JS :
    codepen.io/mayurbirle/pen/ppqRoZ?editors=0010

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

      I added the JS code and nothing happened, in the code htlm you did not make any function call. In my case I just added the JS in the local what kind of function call do I add in the html, after adding the JS ??

    • @junioraraujo7966
      @junioraraujo7966 6 ปีที่แล้ว

      Ignore the message! I already got kkkk now a little haha, it was because I had changed the input addresses (# i1) to (# t1) kkkkk I did not pay attention to the address specified in JS, but now it worked, great code, good work!

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

      and how to add when hover, it pause ?
      (and add radio buttons for keyboard navigation)- only left right.
      and in html use the vw in conbination with lazy load to prevent screen moves up down when pic load it ( any better lazy load than lozad.js ? + how lozad.js load 0.5 sec before it show ?) need to learn js i know..

    • @pratikjadhav1154
      @pratikjadhav1154 5 ปีที่แล้ว

      hi , i visited the link there is a image slide but the css is scss can you suggest some codepen for slider with postcss , i havent learnt till yet how to covert scss.:)

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

    Nice job! Many channels make so much noise in the vid with annoying intro, etc etc.. you made it clear and simple, well done .. +1 sub

  • @JasmineMarieBushell
    @JasmineMarieBushell 6 ปีที่แล้ว +6

    Works Perfect! It was racking my brain for 2 days trying to find a good slider for my website that didn't use Javascript! Thanks

    • @glygn
      @glygn 5 ปีที่แล้ว

      it's doesn't work at all for me

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

    If you like, you can put that when the i are checked, each label dot lights up, like this:
    #i1:checked ~ .nav #dot1{
    background-color: white;
    }
    #i2:checked ~ .nav #dot2{
    background-color: white;
    }
    #i3:checked ~ .nav #dot3{
    background-color: white;
    }
    You can also make the arrows appear, like so:
    .pre, .nxt{
    width: 9%;
    height: 16%;
    position: absolute;
    top: 50%;
    z-index: 99;
    cursor: pointer;
    border: solid black;
    border-width: 0 5px 5px 0;
    }
    .pre{
    left: 3%;
    transform: translateY(-50%) rotate(135deg);
    }
    .nxt{
    right: 3%;
    transform: translateY(-50%) rotate(-45deg);
    }

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

    Thanks man. You made it possible for me to get the project done. I am kind of struggling a bit understanding the z-index: -1 and 9 for the checked values though.

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

    I added "class='buttons'" to each radio button so that my CSS is just ".buttons {display: none}" instead of #id1, #id2, #id3, #id4, #id5 {display: none}. This allows a dynamic number of slides/images without changing the CSS.
    I also used display:flex to center the next/previous arrows (in your CodePen) both horizontally and vertically.

    • @idasgaard2681
      @idasgaard2681 4 ปีที่แล้ว

      Could you help me with this please?

  • @mp-bass
    @mp-bass 2 ปีที่แล้ว

    this is one of the best tutorial so far, thank you

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

    You made it soo simple and easy to understand, Thank You So Much!!!!!

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

    Thanks so much for the tutorial! Exactly what I've been looking for. Works great!

  • @TecnologiaRadioativa
    @TecnologiaRadioativa 6 ปีที่แล้ว +9

    Perfect amigo, i am from brazil, is code my save !!!!! tanksss

    • @PihFrags
      @PihFrags 3 ปีที่แล้ว

      KEKW

  • @kaaviyam2710
    @kaaviyam2710 8 หลายเดือนก่อน

    Wonderful. Strainght to the point

  • @lparanhos
    @lparanhos 4 ปีที่แล้ว

    Thank you! The only one who worked without a problem!

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

    Very good and simple code/explanation. Congratulations!

  • @syberiaok
    @syberiaok 4 ปีที่แล้ว

    Thanks a lot. It helped me after a long day of frustration.

  • @owaisahmad6613
    @owaisahmad6613 6 ปีที่แล้ว

    Thank you very much. Very helpful video. Special thanks for giving the code link in description.

  • @bachhaoly7761
    @bachhaoly7761 5 ปีที่แล้ว

    Work charmingly

  • @MangaMonster118
    @MangaMonster118 6 ปีที่แล้ว

    Finally a slideshow that works! Thanks

  • @owner2303
    @owner2303 6 ปีที่แล้ว

    Awesome! I have been looking for this for two weeks now, LOL!

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

    Thank you!!!! It was really helpfull!! Compared to what i watch the last time, too many talk and nonsense code adding to it-_-

  • @overeasy_sean251
    @overeasy_sean251 3 ปีที่แล้ว

    Tutorial is very pog

  • @kev_ikena2612
    @kev_ikena2612 4 ปีที่แล้ว

    Thanks bro.........i like you video.

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

    Thanks dude, your video helped me a lot ! You won a
    subscribed !

  • @andrerothweiler9191
    @andrerothweiler9191 7 ปีที่แล้ว +6

    That is pretty cool. Is this lighter for a browser compared if you use JavaScript?

    • @webdecorator6614
      @webdecorator6614  7 ปีที่แล้ว

      This is lighter than any plugin but functionality of CSS slider is limited ( like:- it's difficult to add auto slide and control both in one slider. ).

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

      anyway to make this you have to be guru ! nice job mate!

  • @saraneditscreations1750
    @saraneditscreations1750 4 ปีที่แล้ว

    Awesome finally learned 🤩

  • @hosseinrahmani9647
    @hosseinrahmani9647 3 ปีที่แล้ว

    Great

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

    The best tutorial for image slider!! ghad thank you soooo much for your vid, it really helped a lot thank you ^_^

  • @phanuc3484
    @phanuc3484 5 ปีที่แล้ว

    Works Perfect! your video helped me a lot ! You won a
    subscribed !

  • @FAKENUM83R
    @FAKENUM83R 4 ปีที่แล้ว

    Finalmente um slide show que funciona ! Excelente vídeo

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

      Pode me ajudar? Como eu uso o código? Salvo os códigos mas nao funciona. Preciso importar alguma coisa?

    • @FAKENUM83R
      @FAKENUM83R 4 ปีที่แล้ว

      @@pedrocosta9769 não. É só fazer igual o vídeo que dá bom. Só têm que tomar cuidado pq, cada slide é uma URL diferente. Eu estava fazendo bem rápido, e não prestei atenção nisso. Reveja o conceito do código e do vídeo que vc tbm faz

    • @FAKENUM83R
      @FAKENUM83R 4 ปีที่แล้ว

      @@pedrocosta9769 qualquer coisa, eu importei ele no meu Github tbm

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

      @@FAKENUM83R Obrigado por responder, pode me passar o link do seu código?

    • @FAKENUM83R
      @FAKENUM83R 4 ปีที่แล้ว

      @@pedrocosta9769 Github.com/mlmauriciolopes

  • @PetraSommer
    @PetraSommer 4 ปีที่แล้ว

    Thank you, it worked perfectly well!

  • @dan-unneeded
    @dan-unneeded 4 ปีที่แล้ว

    WOW

  • @aivarasgrigonis656
    @aivarasgrigonis656 5 ปีที่แล้ว

    Very nice

  • @ashangel7343
    @ashangel7343 6 ปีที่แล้ว +6

    Hey man I loved your tutorial..
    But, I got a question..
    How do I add keyboard navigation to this, so that I can navigate the slider with the left and right arrow keys??

    • @aitboss85
      @aitboss85 5 ปีที่แล้ว

      You can use radio buttons, they support keyboard arrows navigation.

  • @МаксимКрутов-е8б
    @МаксимКрутов-е8б 4 ปีที่แล้ว

    Super!

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

    you saved me, thank you

  • @felipebatista7469
    @felipebatista7469 3 ปีที่แล้ว

    i am from brazil! thanksssssssss brow!

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

    os caras são muito bruxo!

  • @sparshgupta8078
    @sparshgupta8078 4 ปีที่แล้ว

    now that is how we want a tutorial to be

  • @it_09arunesh_gautam97
    @it_09arunesh_gautam97 4 ปีที่แล้ว

    thanks really helpful

  • @وليدالنادي-ح3ق
    @وليدالنادي-ح3ق 3 ปีที่แล้ว

    Thanks Alot

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

    +subs

  • @kalidasanpotti1661
    @kalidasanpotti1661 6 ปีที่แล้ว

    Thank you sir it worked out for me 👍👍👍

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

    Thanks

  • @FLYER395
    @FLYER395 6 ปีที่แล้ว +3

    i have a problem
    i have tried 3 different variants of doing slide show
    and i cant do that
    i copied this code
    and the img are not in cointainer
    they are above each other
    i open with google chrome
    why>?

  • @mehrshadazizi7456
    @mehrshadazizi7456 5 ปีที่แล้ว

    Thanks a lot it worked true.

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

    does it work without the radio buttons ?

  • @DavidNitzscheBell
    @DavidNitzscheBell 6 ปีที่แล้ว

    that's f'ing awesome!

  • @pabios
    @pabios 5 ปีที่แล้ว

    thankx . really

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

    very nice! Is there a way to not stretch the images if they are not all the same proportions?

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

      Check out Canva.com for easy photo editing, file type changes, and re-sizing/cropping.

    • @friedchicken1
      @friedchicken1 6 ปีที่แล้ว

      tanks!!!! :)

  • @JonoBaritaspasial
    @JonoBaritaspasial 5 ปีที่แล้ว

    Thanks you so much !!

  • @SteveFlanigan
    @SteveFlanigan 6 ปีที่แล้ว

    Is there an issue with the audio portion on your video? I am not hearing anything.

  • @Khufos
    @Khufos 5 ปีที่แล้ว

    You're boss, thank you !!

  • @karunakarpatel194
    @karunakarpatel194 5 ปีที่แล้ว

    Great one. It finally helped me :)

  • @kalaek9318
    @kalaek9318 6 ปีที่แล้ว

    Thankyou it's a good tutorial

  • @alexblue8524
    @alexblue8524 5 ปีที่แล้ว +3

    I can't understand what this symbol ~ means, could someone help me ? please!!!

    • @m.art.a
      @m.art.a 5 ปีที่แล้ว +1

      With tilda (~) you can select siblings, not only sibling right next to the element when you use it (like + selector do), but the all elements on the same level. I think.
      no red
      ...
      red
      ...
      red
      div:hover ~ p { color: red; }
      So for example, when you hover element, elements on the same level like that will get color red, but not and the in . Also, you notice that el. are not first siblings, i mean they are not sit right next to .
      Sorry for my english

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

      @@m.art.a I'm not native, but in my opinion you're English is perfect, I could understand perfectly, so thanks.

    • @m.art.a
      @m.art.a 5 ปีที่แล้ว

      @@alexblue8524 Hhh, not great not terrible. Im glad you understood.

  • @omerbutt5662
    @omerbutt5662 4 ปีที่แล้ว

    It's not working, it's just displaying a dummy slider template, but the navigation is not working, neither the side navigation, nor radio navigation both are just dummy template and are not navigating through the way you showed. What could be the reason

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

    Hello!!!
    I am not familiarized with SCSS and I can't run your code... Is there a way to do it with CSS?

  • @mohammed-i786
    @mohammed-i786 5 ปีที่แล้ว

    Can you please make this silder autoplay by using JQUERY? And please explain the concept of making it autoplay as you did in the video above.

  • @idasgaard2681
    @idasgaard2681 4 ปีที่แล้ว

    I am trying to add arrows on the left and rigt side of the slider but evnen though the arrows Z-index is lower than the navigations Z-index, the surface above the arrows is not clickable. Do you have any idea what could cause this problem?
    bedst regards

  • @some_user1337
    @some_user1337 6 ปีที่แล้ว

    Nice code, dude!

  • @kaleab27
    @kaleab27 4 ปีที่แล้ว

    Ur work is good but the ur camera need a little bit of an update

  • @vohnlanusa471
    @vohnlanusa471 6 ปีที่แล้ว

    HI! Your Video is really helpful!! But what if I have 12 id tags? What would be my z-index? I don't understand why did you come up with 9 if the #one is checked... Pleaseeee answerrr..

  • @ashwinchaurasiya443
    @ashwinchaurasiya443 6 ปีที่แล้ว

    Really good code

  • @oli2034
    @oli2034 4 ปีที่แล้ว

    How would you incorporate something like this in a grid item?

  • @glygn
    @glygn 5 ปีที่แล้ว

    I copied the code exactly, but it's broken. image are placed as single images rather than vied as a slider

  • @hellnavv
    @hellnavv 6 ปีที่แล้ว

    thank you!!! ;_; helped me sooooo much

  • @UrvashiThakur-zy4jf
    @UrvashiThakur-zy4jf 5 ปีที่แล้ว

    It's working but after putting it in my code my navbar is gone ? Putting navbar fixed isn't also helping

  • @Luffyboy441
    @Luffyboy441 5 ปีที่แล้ว

    Can I use this by replacing images with a contact form or some sort?

  • @GurabaMediaBD
    @GurabaMediaBD 6 ปีที่แล้ว

    How to make it auto slider after every 5 seconds?

  • @ЕкатеринаКосолапова-щ7б
    @ЕкатеринаКосолапова-щ7б 7 ปีที่แล้ว +1

    WOW! Thank you very much! This works perfectly and the code is simple)))

  • @MRetroGamer
    @MRetroGamer 5 ปีที่แล้ว

    I'm having some trouble with the previous and next labels. They're not working propperly. Pretty much every "next" label takes me to i1, and every "previous" label to i4. I'm pretty sure I got the code the same as you do, so I'm not really sure why is it failing.

    • @webdecorator6614
      @webdecorator6614  5 ปีที่แล้ว

      okay, can you give me a link of your code? So I check it.

    • @MRetroGamer
      @MRetroGamer 5 ปีที่แล้ว

      @@webdecorator6614 That's perfect! Thanks a lot :)

  • @nicelypenn
    @nicelypenn 6 ปีที่แล้ว

    I recreated the code in the video in brackets. The output I got was the images with elongated circles in the middle that I can click to change the image. But it looked nothing like the end result in the video.
    I was confused by what was being shown in my browser since the code was copied. So I decided to go to the codepen link and copy and paste the code into brackets. The result was just the images on the page without any styling. So I decided to make my own codepen account and copy and paste the code from the codepen link to see if on my codepen account it would look the same. It doesn't. It just had the images and no styling. Could someone explain why the results turn out different despite the same code?

  • @isischan327
    @isischan327 5 ปีที่แล้ว

    I'm having some problem with the buttons cause it's not showing, I'm using brackets btw.. does anyone know how to fix this?
    Edit: I redid it and it works! There must have been a code i didn't input correctly, thank u thank sooo much again ❤️

  • @ganesan.r5430
    @ganesan.r5430 3 ปีที่แล้ว +1

    #i1: checked~#one{
    z-index: 9;
    }
    not working don't know why

  • @marceloguimaraes6087
    @marceloguimaraes6087 5 ปีที่แล้ว

    like!!!

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

    Hello sir how to use arrow in this tutorial

  • @punjabeducationentertainme1209
    @punjabeducationentertainme1209 5 ปีที่แล้ว

    Dear Sir,
    image slider is working fine on pc site but slider not showing on mobile.
    plz share code to add so that slider should show on mobile.
    plz guide me.
    Thanx Sir.

  • @saisrinivaskaligatla6002
    @saisrinivaskaligatla6002 6 ปีที่แล้ว

    better do a video on text slider with controls as like image slider.

  • @Fullwisher
    @Fullwisher 4 ปีที่แล้ว

    I did exactly like the video but my dotted bar appears at the top of the page instead. Can anyone help?

  • @eliavr4216
    @eliavr4216 6 ปีที่แล้ว

    Could I use this Image Slider for my personal Website?

  • @hiddenjewelsmedia
    @hiddenjewelsmedia 5 ปีที่แล้ว

    how would I move it automatically without javascript ?

  • @gitabhaktisagar
    @gitabhaktisagar 5 ปีที่แล้ว

    It's so honoured
    I wanna know which editor do you use
    To see the output on the right of code

    • @pratikjadhav1154
      @pratikjadhav1154 5 ปีที่แล้ว

      Its codePen , google it and go on 1st link

  • @jaytee1662
    @jaytee1662 6 ปีที่แล้ว

    Which editor you using??

    • @katien.1921
      @katien.1921 6 ปีที่แล้ว

      They're using codepen.io

  • @Saudavelpro
    @Saudavelpro 7 ปีที่แล้ว

    mto bom

  • @JamesWelbes
    @JamesWelbes 4 ปีที่แล้ว

    Videos with no audio creep me out

  • @farheenfarooq1749
    @farheenfarooq1749 5 ปีที่แล้ว

    it would be easier if there was some explanation while coding.

  • @VRPPawar
    @VRPPawar 7 ปีที่แล้ว

    How you reduce videos size which software you use

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

      I am not using any special software to compress video, YT uses there own algorithm to compress the videos sizes.

  • @eduardoklarmann1083
    @eduardoklarmann1083 6 ปีที่แล้ว

    hi, how i can use with local images in my pc?

  • @jv18creator
    @jv18creator 4 ปีที่แล้ว

    How do I make this autoplay?

  • @34_sanskritikushik43
    @34_sanskritikushik43 4 ปีที่แล้ว

    I don't why, it isn't working for me😓

  • @miahrana9040
    @miahrana9040 5 ปีที่แล้ว

    Can anyone tell me,, what is the name of this codding Software,,,, plz give me download link,,

  • @salvadorangeles500
    @salvadorangeles500 4 ปีที่แล้ว

    Thank you very much for the contribution, I need some help with the creation of a page like Slides.com, if you have any input I would appreciate it.

  • @carmelamavungu5680
    @carmelamavungu5680 4 ปีที่แล้ว

    where is the code html

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

    PLZ GIVE ME THE CODE FAST PLZ

  • @HimanshuSharma-jr1jj
    @HimanshuSharma-jr1jj 5 ปีที่แล้ว

    Sir all my images are appearing vertically

  • @solianojewelle4551
    @solianojewelle4551 4 ปีที่แล้ว

    it's not working :(

  • @Bravox84
    @Bravox84 6 ปีที่แล้ว

    how to add keyframe autoplay? :-(

    • @tamhuathanh4331
      @tamhuathanh4331 6 ปีที่แล้ว

      u need javascript for that. in this video only used css3. that's why it cant autoplay

  • @justlearn2860
    @justlearn2860 6 ปีที่แล้ว

    How to make it move itself

    • @webdecorator6614
      @webdecorator6614  6 ปีที่แล้ว

      Check the JS of this PEN
      codepen.io/mayurbirle/pen/ppqRoZ?editors=0010

  • @sumon5462
    @sumon5462 3 ปีที่แล้ว

    Sound ni

  • @laischai5079
    @laischai5079 4 ปีที่แล้ว

    it is useless, one image remains under the other and does nothing.

  • @scottlanden19
    @scottlanden19 5 ปีที่แล้ว

    Thanks