+ 13

Help with HTML please 😄

It's been a while since I have asked a question like this on SL. I would like to know how to create a slider in web? Like a slideshow, or an image slider. Is there a way to do it with CSS? I'm not very good at JavaScript 😅 Any help is appreciated 😄 Thank you 😊

1st Mar 2018, 2:58 AM
Learnsolo
7 Antworten
+ 14
Yes, you can do it with only CSS, although it is not very common. The trick is to make an infinite animation and play with the margins. In Codepen there is a great example of what I say: https://codepen.io/daysahead/pen/mJqBge
1st Mar 2018, 3:08 AM
Mickel
Mickel - avatar
+ 8
@Mickel Thanks 😊
1st Mar 2018, 4:34 AM
Learnsolo
+ 8
Step 1: Array of images Step 2: Buttons for next and previous Step 3: next() and previous() Here is my hall of fame code. https://code.sololearn.com/WyUb3qV9HD3a/?ref=app This uses an image slider so you might use it :)
1st Mar 2018, 10:53 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 5
You can see this one. It uses only basic js.😊 https://code.sololearn.com/Wdhu3v833Iml/?ref=app
1st Mar 2018, 4:42 AM
Шащи Ранжан
Шащи Ранжан - avatar
+ 4
@Mickel nice! But that's just an animation. Image slider means there must be two buttons so that user could change image as per wish and so it requires js.
1st Mar 2018, 4:45 AM
Шащи Ранжан
Шащи Ранжан - avatar
+ 3
Yes, there's a way to make a slider with using just basic js and CSS, it doesn't require to be very good at js😉.
1st Mar 2018, 3:07 AM
Шащи Ранжан
Шащи Ранжан - avatar
19th Jul 2018, 7:36 PM
Mark Aloo
Mark Aloo - avatar