Pure CSS Image Slider Using Only HTML & CSS

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2020
  • Today, I’m going to show how to make an image slider | slideshow using html and css , No javascript , pure html & css.
    If you enjoyed the video don't forget to subscribe and turn on your notifications! , Like and Comment .
    📺Subscribe To My Channel and Get More Great Tips : / @deltatycode
    Download files from here :github.com/Deltaty-Code/Image...
    Paypal Donation : www.paypal.me/mourouh
    Text Editor : code.visualstudio.com/?wt.mc_...
    How To Create a Profile Card Using HTML and CSS
    • How To Create a Profil...
    How To Create Linkedin Loader Using HTML and CSS
    • How To Create Linkedin...
    How To Create Transparent Login Form Using HTML and CSS
    • How To Create Transpar...
    How To Add Loading Animation To Website Using HTML AND CSS | CSS Loading Page Animation
    • How To Add Loading Ani...
    FACEBOOK : DeltatyCode/...
    INSTAGRAM : / mouhamedmourouh
    LINKEDIN : / m-mourouh
    𝗚𝗜𝗧𝗛𝗨𝗕 : github.com/m-mourouh
    🎵 Music :
    Music provided by NoCopyRightSounds.
    Track1: BVRNOUT - Take It Easy (feat. Mia Vaile) [NCS Release]
    Watch: • BVRNOUT - Take It Easy...
    Free Download / Stream:ncs.io/TakeItEasyID
    Track2: Rival x Cadmium - Seasons (feat. Harley Bird) [NCS Release]
    Watch: • Rival x Cadmium - Seas...
    Free Download / Stream:ncs.io/SeasonsID

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

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

    Loved it! Just started learning HTML+CSS and couldn't find any easy to follow tutorials

  • @Shotbysimmons
    @Shotbysimmons 2 ปีที่แล้ว

    Thank you for this video I had a problem with my images not loading from local system. I noticed you had your images saved in the same folder as your project, when I moved mine to the project folder they worked.

  • @user-on8rr1fo8k
    @user-on8rr1fo8k 5 หลายเดือนก่อน

    Боже , огромное спасибо, сейчас учусь верстке и ваш ролик безумно помог!
    Сидела над этим сама часа три не меньше, в итоге благодаря вам вопрос решился за пару минут)

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

    without using javascript u have make this very cool image slider, thanks bro

  • @anusham2689
    @anusham2689 2 ปีที่แล้ว

    thank you so much....without u i never complete my task

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

    Very helpful, have seen so many tutorials but this one was very simple and elegant, thank you soo much

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

      Thank you Bhavna Nagar

    • @DeOLite
      @DeOLite 2 ปีที่แล้ว

      maybe you setted img not container 100%?

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

      Hi pls tell me what is use of transition tag

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

    Thanks! Me quedo genial!

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

    Très intéressant, bravo Mohamed merci pour le tuto ! 💪🏻

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      Merci beaucoup Futur Digital.

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

    Nice , I love this tricks

  • @jashanpreetsingh1875
    @jashanpreetsingh1875 11 หลายเดือนก่อน

    very helpful.. was struck here for an hour
    thankuuuuuu so much

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

    I don't know how to put all of this into a container because it all gets messed up. Any help?

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

    06:27 current viewing image circle should be white to differentiate from rest of the images.

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

    Thank you so much, you made my web page assigment prettier!

    • @emmettroberto7195
      @emmettroberto7195 2 ปีที่แล้ว

      I guess im asking randomly but does someone know a method to log back into an instagram account..?
      I somehow forgot my login password. I would appreciate any help you can offer me.

    • @tysondaxton3911
      @tysondaxton3911 2 ปีที่แล้ว

      @Emmett Roberto instablaster =)

    • @emmettroberto7195
      @emmettroberto7195 2 ปีที่แล้ว

      @Tyson Daxton I really appreciate your reply. I got to the site through google and I'm in the hacking process now.
      Seems to take quite some time so I will get back to you later with my results.

    • @emmettroberto7195
      @emmettroberto7195 2 ปีที่แล้ว

      @Tyson Daxton it did the trick and I now got access to my account again. I'm so happy:D
      Thank you so much you saved my account !

    • @tysondaxton3911
      @tysondaxton3911 2 ปีที่แล้ว

      @Emmett Roberto glad I could help xD

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

    a very good slider

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

    Nice 😍

  • @jyotijadhav7532
    @jyotijadhav7532 2 ปีที่แล้ว

    Thank u so much yar 🤗it was very helpful 🙌

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

    TYSM

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

    Hi can you help me? I did this and everything works except my images in the slider overlap eachother and when they move part of them move too far to fit in the slider or not far enough so you can see part of one image and part of another. I did everything exactly the same as you except I used 6 images and not for. Could you tell me what I need to change in the code so these six images slide perfectly into the slider showing only one image?

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

      try to set the images width to 100% of their container .

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

      @@DeltatyCode they are

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

      @@panslawista same problem I am facing, I resized the images still it's not working

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

    Hello, thank you for the video! I just wanted to know why do we have to put width:60% for the .slider? When I try in mine, there is a piece of the next picture visible, and the next pictures have pieces of the ones after them bigger and bigger each time.
    Thanks for the answer!

    • @2eElegant-Ensemble
      @2eElegant-Ensemble 3 หลายเดือนก่อน

      My one also same problem

    • @DeltatyCode
      @DeltatyCode  3 หลายเดือนก่อน

      Hi guys, it's better to have images of the same size to create a slider using only HTML and CSS. Otherwise I created another tutorial where I showed how to create an image slider easily using the Swiper library so I recommend you use an external library to create this kind of slider.
      check this :
      th-cam.com/video/_GDPi4P4m74/w-d-xo.html

    • @TiffenBusson
      @TiffenBusson 3 หลายเดือนก่อน

      @@DeltatyCode thank you for your answer, but I can assure you that my pictures are all the same size, both in height and width! So I wonder what the problem could be?

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

    Subscribe To My Channel and Get More Great Tips : th-cam.com/channels/fCOsSNqcNRkiviaHH5vnrQ.html

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

    So very Helpful....!!! I was searching for how to use sliders in html, in vs code...and i found this- Simple and Best.... 👍😊

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

      Hi could u pls tell me what is the use of transition tag here.

  • @maverickazarcon3581
    @maverickazarcon3581 7 หลายเดือนก่อน

    asamualaykum thank you for your informative codees

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

    Hey bro, i got a problem, i have 4 pictures like u and the second one is placed on the first one, there are just 2 images on one slide, on second slide there are three images and theres part of them cut, idk what to do, any tips? i copied the code from u too to see, if its only my mistake in code or something but it does the same.

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

      Try to use images with the same size or resize them with CSS.

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

    Thanks for sharing.. Wow

  • @the_artful_touch
    @the_artful_touch 7 หลายเดือนก่อน

    tutorial is very helpful.. just one query, my slide contains grid of images, it is working fine with this code except for first slide where it shows all 3 slides combine.. can you please tell me the missing part?

    • @DeltatyCode
      @DeltatyCode  3 หลายเดือนก่อน

      it's better to have images of the same size.

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

    thanks Sir

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

    Bro one help auto mattic silder scroll transmission I can be use its is passible bro

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

      Yes, u can make it automatic using css animations

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

    muito obrigado amigo, saudações brasileiras!

  • @user-om1rn1cd7n
    @user-om1rn1cd7n 8 หลายเดือนก่อน

    super bro

  • @enji5942
    @enji5942 2 ปีที่แล้ว

    i need help, i used 8 images with 16:9 sizes and whenever i try to hover it in the middle the others are not sliding

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      in this video we have 4 images in your case u have 8 so u need to add more radio buttons and labels and styles them . This way u can fix this issue

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

    i downloaded your file from the link in the description and i have linked them all properly but there is an issue. The image seven at 100% width don't contain the full space of the images div. Pleas confirm for by yourself and reply me. i really like your videos.

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

      it’s normal,if u have a small image,it will not cover all div .
      So u should resize you image .

  • @stefanwebdev1803
    @stefanwebdev1803 2 ปีที่แล้ว

    How did you made that rgb (25,12,41) color ? It was not appearing at me ....

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      you can use this hex color instead of rgb color : #190c29

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

    my first image is aligned properly but other 3 are too much stretched why??

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

      Slide images should have the same size

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

      Always use png extension while using any pics ...it retains the original size of the pic

  • @JoeGelman
    @JoeGelman 2 ปีที่แล้ว

    How would you make the circle that's clicked be filled in?

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      every circle is linked with a radio button , so when you click on a circle the associated radio button gets checked, and this will allow you to fill in circle using background-color property .
      (e.g : #btn:checked ~ .circle{background-color:#FFFFFF ;} ) , here btn represents the radio button and circle represents the dot. I hope this helps you .

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

    hi, nice tutorial, but i cant see my images, they are "under" all on website, how can i fix it?

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

      Check the description section and try to download source code of this slider.
      Try to resize ur images, it’s recommended to have the same size.

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

    thanks for this video! on my side the images do not slide

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

    ❤️

  • @zgallerie787
    @zgallerie787 2 ปีที่แล้ว

    Your videos is good kindly also guide every tag , why you use

  • @comicghozt
    @comicghozt 6 หลายเดือนก่อน +1

    Hello. Very nice tutorial.
    How to make the selected image stay checked on the dots?

    • @DeltatyCode
      @DeltatyCode  6 หลายเดือนก่อน +1

      Use :checked +
      I did that on this video : th-cam.com/video/QE1cugQggjk/w-d-xo.htmlsi=7fsHI5x5n5s2v5tC

    • @comicghozt
      @comicghozt 6 หลายเดือนก่อน

      Thank you friend.

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

    Great job, its just awesome what u can do with only html/css!!! I have 20 images, so i wanted to make it slide 4 images each time, im trying since yesterday to figure it out, but i cant manage how to do it, can u give me some help?

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

      U can add them all in HTML and control them with radio buttons and css

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

      @@DeltatyCode thats what i did, the only problem is that when i press the 3rd/4th/5th/6h radio button the pictures start zooming and it dont show all the 4 pictures i want, and i followed ur logic (0 -100% -200% -300% -400% -500%)

  • @user-jb3iz9qw8j
    @user-jb3iz9qw8j 11 หลายเดือนก่อน

    I know you might not see this comment but may I ask what were the resolutions of the images you used in the video?

    • @DeltatyCode
      @DeltatyCode  9 หลายเดือนก่อน

      Hi, you find them on GitHub repository.
      The is in the description section

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

    Does this translate well onto smaller devices like phones?

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

      u can make this responsive using css media queries

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

    why the tilde ~ 👈 what it does or why it is used .

    • @ganesan.r5430
      @ganesan.r5430 2 ปีที่แล้ว

      @MOHAMED MOUROUH ok bro thank you

  • @user-uq5zd9eh7l
    @user-uq5zd9eh7l 2 หลายเดือนก่อน

    can it be turned to auto slide?

    • @DeltatyCode
      @DeltatyCode  2 หลายเดือนก่อน

      You can use css animations for that.

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

    please, tell me how to keep the color of white when the user has pressed a radio?

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

      Hi Zaher, for this you can check when the radio button is checked and then set the background to white to the corresponding dot .
      Something like this : .rdBtn:checked ~ label : { background: white }

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

      @@DeltatyCode I suffered the whole day but, I couldn't find anyway to keep it white. Are you sure if this is going to work?

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

      Can you tell me is this the exact code that I have to paste here?

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

    Hello what theme do you use please ?

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

      Hello Thomas 🙌 : I am using monokai vibrant theme that I customised with some colors .
      You can find the steps to get the same theme I have in this respository on my github account : github.com/m-mourouh/My-Custom-Theme

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

    Can u pls share the code for this ? It's amazing

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

      You can find the source code in the description section

  • @danielroman1484
    @danielroman1484 2 ปีที่แล้ว

    My dots don’t come up in the center any tips?

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      You can center them using margin : npx auto , or with flexbox

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

    Thank you so much, but I have a question
    My photos are in potrait mode so can you show me the code of some potrait photos slider
    Thanks btw

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

      You just have to change the width of the images container

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

      Thanksss it is working now

  • @outsidesympathy
    @outsidesympathy 2 ปีที่แล้ว

    I am learning so..What is ..checked ~ m1,i don't know, can you explain me?

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

      (~) This basically means that it will select all siblings after a selector.

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

    Thanks for the source code I managed to edit it out. Is it possibly that a video could be contributed in the slider ?

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

      thank you for your comment ,
      yes of course you can add a video in the slider

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

      @@DeltatyCode is there a video displaying this ?

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

      ??

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

      If it's a separate video please forward me a link.

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

      ​@@wavyw997 To display your video in the slider ,I think you should add it as you do with images , but it's a little bit different , (Sorry I have no video that shows how to make a video slider
      )

  • @window-creative
    @window-creative ปีที่แล้ว

    Akhuya bayna fik maghribi 🌝

  • @WajidCodes
    @WajidCodes 10 หลายเดือนก่อน

    I am pakistani
    Thanks brother
    😍😍😍

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

    what was the dimensions of your images

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

      They have different sizes but I resized them with Css .

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

      @@DeltatyCode Thanks 👍

  • @jackblacks4176
    @jackblacks4176 10 หลายเดือนก่อน

    How do we make it slide automatically please?

    • @DeltatyCode
      @DeltatyCode  9 หลายเดือนก่อน

      You can use CSS animation for that.

  • @samoli02
    @samoli02 2 ปีที่แล้ว

    Why the picture is gone after following all the steps

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      Download the code of this project then try to see where u have a problem .
      You can find the link to the source code in the description section,

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

    How to center the whole slider?

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

      Hi @Smiley,
      For this you can put your slider inside a container and then center it using either flex box or any other way like (grid system, position …).
      Enjoy 😉.

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

    photos must be in same size:

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

      Yeah , if they havn't the same size u can resize them with css

  • @lynxlecher9547
    @lynxlecher9547 2 ปีที่แล้ว

    This doesn't work either. All I want is a simple left and right gallery and all I find is these sliders that don't work.

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

      You can download this project from the source code in the description section .

    • @lynxlecher9547
      @lynxlecher9547 2 ปีที่แล้ว

      @@DeltatyCode I decided to do it another way but thank you for letting me know. And sorry for my comment, I was frustrated.

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

    adi cheste vasta ledu naku

  • @reulacto7109
    @reulacto7109 2 ปีที่แล้ว

    your code isn't working !! with other images !!
    if you are free please reply to my comment.

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      u can resize your images with css

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

    Bro, slider is not visible for full screen, what can i do, help me sir

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

      change the width and height of images

  • @TheGuyWithWifi
    @TheGuyWithWifi 2 ปีที่แล้ว

    3:20 mine looks nothing like yours

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      You can download the source code of this hamburger menu from the link in the description section.

  • @hananela1673
    @hananela1673 2 ปีที่แล้ว

    جميل لكن الكود ماعم ينضبط

    • @DeltatyCode
      @DeltatyCode  2 ปีที่แล้ว

      ممكن تحميل كود هذا image-slider من Github , الرابط في صندوق الوصف.

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

    helpful but, something not understanding

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

    Only Time pass

  • @harikaadam5411
    @harikaadam5411 10 หลายเดือนก่อน

    Is it just me or this shit not working
    Please help😢

    • @DeltatyCode
      @DeltatyCode  9 หลายเดือนก่อน

      Hi, you can get the source code of this menu from the link in the description section

  • @tonytony-fc6gq
    @tonytony-fc6gq ปีที่แล้ว

    A WASTE OF TIME, this does not work, all 4 images are showing

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

      You can download the code of this image slider from the GitHub repo in the description section. Or you can download this one and replace images (github.com/m-mourouh/swiper-image-slider).

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

    Mat kar bhai aesa muh se bolna seekh

  • @user-vk1pr7qg4b
    @user-vk1pr7qg4b 7 หลายเดือนก่อน

    👎👎👎👎

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

    Great tutorial!
    appreciate you sharing files too :yougotthid;