Тёмный

Responsive Slider Using HTML & CSS Only 

Anna Blok — Frontend Tutorial
Подписаться 6 тыс.
Просмотров 230 тыс.
50% 1

🔥 Best Free UI Design Platform Wondershare Mockitt: bit.ly/3AA4GTW
Codepen - codepen.io/anna_blok/pen/eYYRbQY
Color Palette - coolors.co/ffffff-00171f-0034...
***
Ask a question to the front-end developer - frontendhelp.me
***
My social networks:
Instagram - / annblok
Twitter - / annblok_webdev

Опубликовано:

 

26 окт 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 172   
@dabelef
@dabelef 3 года назад
Awesome work Anna, thanku so much, it has been super useful! p.d: I noticed the left arrow wasn't working, figured out if you invert the order of the numbers like shown below it works as it's supposed to:) #slide1:checked ~ #controls label:nth-last-child(1), #slide2:checked ~ #controls label:nth-last-child(4), #slide3:checked ~ #controls label:nth-last-child(3), #slide4:checked ~ #controls label:nth-last-child(2){ background: url(Images/LeftArrow.svg) no-repeat; float: left; margin: 0 0 0 -50px; display: block; }
@luonggg7985
@luonggg7985 2 года назад
thank you so much
@sanjeevd6872
@sanjeevd6872 Год назад
Neenga Tamil ah
@pytonbengalski9970
@pytonbengalski9970 Год назад
thank you
@JoaoPaulo-ox6pr
@JoaoPaulo-ox6pr 2 года назад
after watching this video i now know. i need to learn pseudo-(selectors,elements,classes) this simply deserves a nobel prize for clearing my mind
@etherealgem1682
@etherealgem1682 2 года назад
I used a modified version of this for my site. If you want to convert it to a slider that automatically cycles between the 4 slides, you need to add some javascript. Include the following in your HTML header: var autoplayInterval = 10000; var autoplayTimer = null; var autoplay = true; var newIndex = 1; if (autoplay) { autoplayTimer = setInterval(function() { newIndex++; navigateSlider(); }, autoplayInterval); } function resetSlider() { clearInterval(autoplayTimer); } function navigateSlider() { const slide1 = document.getElementById('slide1'); const slide2 = document.getElementById('slide2'); const slide3 = document.getElementById('slide3'); const slide4 = document.getElementById('slide4'); if (newIndex == 1) { slide1.checked = true; } else if (newIndex == 2) { slide2.checked = true; } else if (newIndex == 3) { slide3.checked = true; } else if (newIndex == 4) { slide4.checked = true; newIndex = 0; } } Note that the first variable (autoplayInterval) is the time between slide cycles. By default, I set it to 10 seconds. Also, you may want to add "onclick="resetSlider()"" to your bullet/control labels, so that if someone navigates through the slides, they stop auto cycling (e.g.: ). Enjoy!
@montserrataguilar8055
@montserrataguilar8055 2 года назад
Your code has literally saved my life! thank youuuu!
@yersiniapestis6049
@yersiniapestis6049 2 года назад
This is what I was looking for! Thanks, great! :D
@koffiemmanuelngou
@koffiemmanuelngou 4 года назад
U've got one subscriber . Great !
@abdelaesus6678
@abdelaesus6678 3 года назад
IMPRESSIVE! THANK YOU ANNA!
@locorocojack
@locorocojack 10 месяцев назад
if you downloaded big arrows you have to modify the background size: #slide1:checked ~ #controls label:nth-child(2), #slide2:checked ~ #controls label:nth-child(3), #slide3:checked ~ #controls label:nth-child(4), #slide4:checked ~ #controls label:nth-child(1){ background: url(right.svg) no-repeat; background-size: 50px; float:right; margin:0 -50px 0 0; display: block; }
@Phillink
@Phillink 10 месяцев назад
Thank you! I was looking for someone who had the same problem...
@isaaclopez7065
@isaaclopez7065 4 месяца назад
thank you my friend it was very helpful
@hezbonotieno6130
@hezbonotieno6130 2 года назад
The slider in the video is different from the slider in the source code. Theirs no side buttons.
@alialhusseini2650
@alialhusseini2650 4 года назад
awesome slides. done some editing on them but overall very good thank you :D
@ajdinpipo08
@ajdinpipo08 3 года назад
This is the best tutorial about slider.Great job!!
@AnnaBlok
@AnnaBlok 3 года назад
Tnx!
@HERMIGNIES
@HERMIGNIES 3 года назад
Thank you from a french guy.
@kreeytiv5036
@kreeytiv5036 3 года назад
wow nice just HTML , CSS you got it
@muhammad_zohaib936
@muhammad_zohaib936 Месяц назад
Thats amazing 👍🤩 You've got 1 subscriber ❤🎉
@blink182lives100
@blink182lives100 3 года назад
Hello, I am not able to get the front and back arrows to appear onto my page. . . I have reviewed the code several times I can not see why I am having this issue. The bullets work
@switbeee1364
@switbeee1364 2 месяца назад
really interesting to watch even though I had no clue on most of what was happening. Really good results too
@andrericardo9660
@andrericardo9660 3 года назад
Hi, congratulations on the tutorial, it helped me a lot. On the 'back' button I set the numbers to nth-last-child (). I made the following change below in the css. # slide1: checked ~ #controls label: nth-last-child (1), # slide2: checked ~ #controls label: nth-last-child (4), # slide3: checked ~ #controls label: nth-last-child (3), # slide4: checked ~ #controls label: nth-last-child (2)
@hazretiFrat
@hazretiFrat 3 года назад
thanks
@dullestimp3475
@dullestimp3475 3 года назад
Thank you!
@stevebrzezinski3392
@stevebrzezinski3392 3 года назад
Thank You
@erickchavez4551
@erickchavez4551 3 года назад
I spent hours trying to figure out what I had done wrong. Thanks so much!
@lennartv.1529
@lennartv.1529 3 года назад
@@erickchavez4551 Where do I have to edit it? I dont get it
@peterkovinski8476
@peterkovinski8476 3 года назад
This is for fixed number of slides. If you have more images to display, then you have to code JavaScript to modify the style sheet
@danishirshad8831
@danishirshad8831 2 года назад
How? '
@cansuaydogan1493
@cansuaydogan1493 4 года назад
Thanks for nice slider video:)But I cant did it Visual Studio. How can i do in visual studio? It doesnt display regular, it displays as line by line as Slide 1, Slide 2 etc.
@AprilSky
@AprilSky 3 года назад
feels like I'm gonna slide to heaven
@davingrahadi3525
@davingrahadi3525 6 месяцев назад
hi annablok, I want to ask, I have followed your images slide tutorial correctly but I have problems here, namely the arrow keys don't work and the image won't shift, I hope you can help me :)
@shubhamkapadia6337
@shubhamkapadia6337 3 года назад
This is Great!! 🤩🤩
@Axelniraj
@Axelniraj Год назад
if Arrows are not visible then use ( background-size: cover; ) property Thnxx 🙂
@NinjaBlade0822
@NinjaBlade0822 3 года назад
that song is so relax
@fhxhnddhmcegvjdthk
@fhxhnddhmcegvjdthk 4 года назад
Анна, напишите пожалуйста, что за музыка играет в начале видео)
@triohmscorporation79
@triohmscorporation79 3 года назад
Thanks for the tutorial and code.
@haiangtran2036
@haiangtran2036 Год назад
Which technology or libraries used in js bro? Whether it is native js or not?
@sematv121
@sematv121 4 года назад
А зачем там стрелка назад если она не работает нормально? Смотрел на codepen
@alejootorres3820
@alejootorres3820 3 года назад
Why is the back arrow not working? it only works from the third point to the first, and vice versa
@idontwhy3132
@idontwhy3132 3 года назад
subbed, very helpful. Thanks
@WindchesterWebDev
@WindchesterWebDev 4 года назад
Это всегда очень круто, когда подобное сделано на чистом CSS. Только вот, жаль, что в реальном проекте 99% вероятности, что никто никогда подобное не применит. Т.к. гораздо удобнее будет slick\owl. Но как концепт - да, это шикарно)
@user-id1mr9ml2l
@user-id1mr9ml2l 4 года назад
Slick\Owl, который зависим от jquery, наес
@WindchesterWebDev
@WindchesterWebDev 4 года назад
@@user-id1mr9ml2l и что?) Чем так плох jQuery? Может, это и не самый производительный инструмент, но в удобстве и количестве библиотек его пока никто не смог обойти.
@mifodiyshtulh8151
@mifodiyshtulh8151 Год назад
нууу стрелку назад я сделал рабочей (автор забил болт, что она не пашет) осталось одно НО, у меня стрелки невидимые....
@vip.ted100
@vip.ted100 6 месяцев назад
ошибаешься мой друг, вот мне и понадобился слайдер без джава скрипта )
@WindchesterWebDev
@WindchesterWebDev 6 месяцев назад
тот самый 1%)
@raghavkumar9485
@raghavkumar9485 3 года назад
How can i create a second slider from this on same page, if i copy it and change some code, it works but you can't see the arrows for navigation neither bullets, HELP!!!!
@PahugerPuruhitaBaiq
@PahugerPuruhitaBaiq 4 года назад
thanks for sharing this!
@Joker-zv8nb
@Joker-zv8nb Год назад
Thanks for this, help me very much!
@_cruzito.x
@_cruzito.x 2 года назад
How do I do if I want to add a fifth element to the slider?
@thescribblersdiary
@thescribblersdiary 5 месяцев назад
Solved my problem. Thanks a lot
@alfredliew5062
@alfredliew5062 3 года назад
you are a freaking legend
@carcar5479
@carcar5479 Год назад
when i put it to mobile view all the text overlaps and crams together. it also wont add the second line
@anupkumar2736
@anupkumar2736 4 года назад
left arrow doesn't work properly.
@MrFreeedman
@MrFreeedman 4 года назад
в сss если поменять цирфры то будет норм перелистывать назад #slide1:checked ~ #controls label:nth-last-child(1), #slide2:checked ~ #controls label:nth-last-child(4), #slide3:checked ~ #controls label:nth-last-child(3), #slide4:checked ~ #controls label:nth-last-child(2)
@orlandog1979
@orlandog1979 4 года назад
or... #slide4:checked ~ #controls label:nth-last-child(2), #slide3:checked ~ #controls label:nth-last-child(3), #slide2:checked ~ #controls label:nth-last-child(4), #slide1:checked ~ #controls label:nth-last-child(1)
@21398403
@21398403 2 года назад
Saludos! Gracias por el aporte hay unos errores en el código que encontré por si otra persona le pasa lo mismo, el primero es en la clase .inner pusiste un line-height: 0; hay que quitarlo porque eso hace que los párrafos que pongas con mas texto se vea uno encima de otro y no se aprecia bien y estas usando en el html una clase slide-content, pero en CSS, no la modificas lo cual se puede eliminar sin problemas en el html .
@davidcastaneda4546
@davidcastaneda4546 11 месяцев назад
muchas gracias se que te esforzaste
@sergaft3295
@sergaft3295 4 года назад
Прямо магия какая то 👏 , тоже так хочу ✨😀✨
@nickspringer5755
@nickspringer5755 3 года назад
The music sounds like a more ambient version of Mice on Venus from Minecraft lol.
@masdetektivetv3504
@masdetektivetv3504 3 года назад
Thanks, its awesome
@Elisha_GG
@Elisha_GG 2 года назад
Ваш контент прекрасен, почему у Вас так мало подсчиков остаётся загадкой.
@kaiodias5474
@kaiodias5474 3 года назад
please how to implement an automatic photo pass on this system?
@AjayKumar-gg4ds
@AjayKumar-gg4ds 6 месяцев назад
Awesome 👌💯
@ithielragnaros
@ithielragnaros 3 года назад
Muchas gracias quedo hermoso ¡
@PedroGualandi
@PedroGualandi 4 года назад
Great work!
@AnnaBlok
@AnnaBlok 4 года назад
Thx!
@azeuniverse3737
@azeuniverse3737 3 года назад
How change slider position. I mean top:56% or right:5% I tried it, but it didn't work
@apuiftekhar8214
@apuiftekhar8214 3 года назад
hi. its nice work.
@MyGeorge1964
@MyGeorge1964 4 года назад
Anna, that was genius - perfect! I'm using it. Except, the back button does not seem to work. Will look at it later. For not it's just perfect! Thanks.
@MsPeepingTallulah
@MsPeepingTallulah 4 года назад
did you every solve the problem of the back slider?
@andrericardo9660
@andrericardo9660 3 года назад
Hello, I posted a comment with the solution I used. I made the following change below in the css. # slide1: checked ~ #controls label: nth-last-child (1), # slide2: checked ~ #controls label: nth-last-child (4), # slide3: checked ~ #controls label: nth-last-child (3), # slide4: checked ~ #controls label: nth-last-child (2)
@xs1089
@xs1089 3 года назад
@@andrericardo9660 Yeah!! It's work!
@hassanch5866
@hassanch5866 3 года назад
What is the name of the music playing in the background?
@fredyrojas7720
@fredyrojas7720 4 года назад
Genial!!!
@aibartolegenov7784
@aibartolegenov7784 2 года назад
Прошу прощения, но текст в тэге текст накладывается друг на друга когда выходит за пределы указанной ширины. Как это можно исправить?
@krossvayz6500
@krossvayz6500 11 месяцев назад
Здраствуй. Нашел решения ?
@AmitGupta-rt2gp
@AmitGupta-rt2gp 4 года назад
Thank you.
@Vickysong1625
@Vickysong1625 2 года назад
When inputting the svg icon to get the clickable arrow in the css, it will not pop out with anything... I am trying to use an alternative svg icon from another source too but it still won't show... any ideas why that's the case?
@Axelniraj
@Axelniraj Год назад
use background-size: cover; the icon size is too large to visible properly
@angelopincas3418
@angelopincas3418 11 месяцев назад
how can I change the color to picture?
@pavlekaranovic7220
@pavlekaranovic7220 4 года назад
dimension of pics in slider pls
@sulemanali8542
@sulemanali8542 3 года назад
thanks alot work for me
@SubcribeWithoutanyvideo-mt4zz
Damn i just watched the trailer I'll do it when am finish my school.
@casterbeat
@casterbeat 4 месяца назад
Thanks !!
@marcoricello7059
@marcoricello7059 3 года назад
how do i link this to my html code in visual studio?
@aleksandrsrudkevics6384
@aleksandrsrudkevics6384 4 года назад
Как раз что искал. Спасибо
@keirembathoungamm1935
@keirembathoungamm1935 4 года назад
Left arrow key does not work properly, if you have time please check it and update as soon as possible
@nobodysperfect29
@nobodysperfect29 4 года назад
For the left arrow try this: #slide1:checked ~ #controls label:nth-last-child(4), #slide2:checked ~ #controls label:nth-last-child(4), #slide3:checked ~ #controls label:nth-last-child(3), #slide4:checked ~ #controls label:nth-last-child(2) { background: url(image.flaticon.com/icons/svg/130/130882.svg) no-repeat; float:left; margin: 0 0 0 -50px; display: block; }
@anishchristopius5502
@anishchristopius5502 4 года назад
@@nobodysperfect29 thanks bud !!
@luxarmiger5729
@luxarmiger5729 3 года назад
Спасибо, дорогая
@katiejenningson8569
@katiejenningson8569 3 года назад
Hi thanks for this it was very helpful! I just have one issue, I copied and pasted the code from codepen but for some reason, my text from h2 and p are overlapping does anyone know how to fix it?
@clevyn3341
@clevyn3341 3 года назад
Use line height or give margin
@rishisharma8596
@rishisharma8596 Год назад
thank you sir
@Vladimir905
@Vladimir905 4 года назад
как всегда всё супер
@shaswat18
@shaswat18 3 года назад
back button not working for second slide in this video
@yuliuspranata15
@yuliuspranata15 Год назад
ty so much mam
@TDmitry412
@TDmitry412 3 года назад
Спасибо.
@alaeen2675
@alaeen2675 2 года назад
how can i made the slider move by it self
@laggron2412
@laggron2412 2 года назад
thank a lot
@muhammadrifqy24
@muhammadrifqy24 3 года назад
there's something wrong with the left arrow button
@aibartolegenov7784
@aibartolegenov7784 2 года назад
How to add more slides???
@victoralmcrespo7310
@victoralmcrespo7310 4 года назад
its preatty good but the back button doesnt work
@user-yd7db3wd7w
@user-yd7db3wd7w 4 года назад
It does but in not a proper way :D
@xx8262
@xx8262 4 года назад
@@user-yd7db3wd7w #slide1:checked ~ #controls label:nth-last-child(1), #slide2:checked ~ #controls label:nth-last-child(4), #slide3:checked ~ #controls label:nth-last-child(3), #slide4:checked ~ #controls label:nth-last-child(2) { background: url(image.flaticon.com/icons/svg/130/130882.svg) no-repeat; float:left; margin: 0 0 0 -50px; display: block; } this is what you should change to make it work right
@PedroGualandi
@PedroGualandi 4 года назад
@@xx8262 thanks! the fix worked perfectly here
@shaswat18
@shaswat18 3 года назад
how can I make the same carousel of 7 slides?can anyone help me
@JansenCCruz
@JansenCCruz 3 года назад
help the icon does not appear for me
@jitendraprajapat6892
@jitendraprajapat6892 3 года назад
How to attach lazy load on this slider
@suchinthasuriyaarachchi8184
@suchinthasuriyaarachchi8184 3 года назад
Can you tell me pixal size in photo ?
@ale_3g230
@ale_3g230 3 года назад
спасибо
@febrikurniawan7276
@febrikurniawan7276 Год назад
thanks :D
@saitanuja2888
@saitanuja2888 3 года назад
Is it responsive?
@dreiigHiveSGClips
@dreiigHiveSGClips 2 года назад
this isnt working in responsive the left arrow isnt showing
@myas2009
@myas2009 4 года назад
excelente ... Hay manera de que sea automático?
@AnnaBlok
@AnnaBlok 4 года назад
tal vez si conectas una animación, pero no será un método flexible
@emirsaherden9716
@emirsaherden9716 3 года назад
gelek spas mamoste
@acquy2279
@acquy2279 4 года назад
nice video !
@AnnaBlok
@AnnaBlok 4 года назад
🤗
@filipmachala7570
@filipmachala7570 2 года назад
Does anybody know how to put it into autotomatic slider? Like every 4sec it will change to next slide. Thank you very much
@etherealgem1682
@etherealgem1682 2 года назад
Look at my comment. :)
@nagaraj2958
@nagaraj2958 3 года назад
Left arrow not working properly
@CreativeAnujkumar
@CreativeAnujkumar 4 года назад
Thanks Anna
@AnnaBlok
@AnnaBlok 4 года назад
😊
@MsPeepingTallulah
@MsPeepingTallulah 4 года назад
Thanks for the video, it would be useful to get the back slider working, can you help?
@ida4095
@ida4095 4 года назад
i managed to fix it, just change this part like so: #slide1:checked ~ #controls label:nth-last-child(1), #slide2:checked ~ #controls label:nth-last-child(4), #slide3:checked ~ #controls label:nth-last-child(3), #slide4:checked ~ #controls label:nth-last-child(2){ background: url(image.flaticon.com/icons/svg/271/271220.svg) no-repeat; float: left; margin: 0 0 0 -50px; display: block; } the sequence was wrong
@gogutans
@gogutans 4 года назад
Hi guys, I find it pretty difficult to add a new slide, could you please help me?
@AnnaBlok
@AnnaBlok 4 года назад
What problems?
@gogutans
@gogutans 4 года назад
@@AnnaBlok could you plase make an update with 8slides? I am trying to add new slides and I cant figure out how
@jordandesigns5797
@jordandesigns5797 3 года назад
@@gogutans @anna blok I have to make a slide without JS for my site but need more than 4 slides, please help
@aibartolegenov7784
@aibartolegenov7784 2 года назад
Same problem, if you have solution may you please write
@josealejandrourielesmontan2022
@josealejandrourielesmontan2022 4 года назад
la flecha de la izquierda esta dañada
@imatecnologia9155
@imatecnologia9155 Год назад
un saludo desde elhabal
@gio2156
@gio2156 2 года назад
воу, не думал что такое можно на пюрешном хтмл и цсс сделать
@elzenhaikal393
@elzenhaikal393 4 года назад
does anyone has any idea how to add new slides to this?
@stanleymakhuza9419
@stanleymakhuza9419 2 года назад
I'm not sure if this would work but try this: For both the HTML and CSS files as an example where it says 'slide1' till the last slide which in this video would be 'slide4' and slide slide_1 div tags in the HTML and the CSS elements. Just copy and paste the last one which would be eg. like this and the CSS elements too. This was something I was just editing After that, you you rename the one that you just pasted to slide_5 (and you can do more eg 6+ if you want) Note you have to do it on all the div tags and CSS elements that end with slide4 and slide_4 for it to work from the input tags till the end. Basically you just copy paste and rename... I have tried to explain this the simplest way possible. Sorry if this sounds too complicated. Hope it possibly helps
@thotanagaraju7871
@thotanagaraju7871 2 года назад
i am not getting the side buttons < likes >
@mythreyiramanan9045
@mythreyiramanan9045 4 года назад
will this code work in visual studio code @Anna Blok
@AnnaBlok
@AnnaBlok 4 года назад
yeah
@usmanmani9743
@usmanmani9743 4 года назад
how to write symbol next to (#slide1:checked)?
@AnnaBlok
@AnnaBlok 4 года назад
add image in background url
@soon3426
@soon3426 2 года назад
Music intro?
Далее
Pure CSS Image Slider  Using Only HTML & CSS
7:39
Просмотров 163 тыс.
Coder un slider en CSS super facilement
12:44
Просмотров 29 тыс.
Пробую торты
00:43
Просмотров 392 тыс.
ГЕНИИ МАРКЕТИНГА 😂
00:35
Просмотров 2,1 млн
Build a JavaScript IMAGE SLIDER in 15 minutes! 🖼️
15:49
Responsive Card Slider in HTML & CSS
8:54
Просмотров 29 тыс.
Pure CSS Responsive Image Slider - HTML5/CSS3 Tutorial
8:36
CSS Slider: Image Slider with controls using CSS3 Only
9:50
Image Rotator using Html and CSS 3 - Website Design
7:28
Pure CSS Responsive Image Slider - Only HTML & CSS
9:20