css responsive timeline slider

How we can create a timeline slider using HTML CSS JS? Solution: See this CSS Responsive Timeline Slider With Swiper JS, HTML CSS JS Timeline.

Previously I have shared a simple Timeline Design, but this is with slider and swiper. Basically, Timeline is design pattern to show step by step methods, study and work experience, or something else like that. Normal timeline contains a straight line with some points, each point has a different time period and experience.

Today you will learn to create HTML CSS JS Timeline Design With Swiper. Basically there is a vertical timeline on the right side of the webpage, and each timeline’s item has a different image. This is a kind of Image slider or carousel with timeline concept, items slide with a button click and swipe.

So, Today I am sharing CSS Responsive Timeline Slider With Swiper JS. Here I have used a JavaScript library named Swiper for easy work, this library is specially built for this work. The item slides in the vertical direction in PC or laptop and slides horizontally on mobile and small screens. I think this program will be useful for you and also you can use this on your website.

If you are thinking now how this timeline slider actually is, then see the preview given below.

Preview Of Timeline’s Carousel

See this video preview to getting an idea of how this carousel/slider looks like.

Live Demo

Now you can see this visually, you also can see it live by pressing the button given above. If you like this, then get the source code of its.

You May Also Like:

CSS Responsive Timeline Slider With Swiper JS Source Code

Before sharing source code, let’s talk about it. First, with HTML I have created slider items, each slider contains an image, a title, some texts and years. I have used HTML Data-* element for store years which is present on carousel items. After that, I have created two arrow buttons and a div for pagination, You can also navigate by clicking on years.

Now using CSS I have placed all the elements on the right place, as you can see in the preview. I have used SVG to placing the arrow buttons, you can use any icon library for that. With CSS, I have done lots of works, like margin, padding, transform, scale, transition, etc. For creating responsive design, used CSS @media query, it will fit on every screen size.

As you know I have used the swiper library to create this design, which is a JavaScript library (get). This library has pre-built functions for creating mobile-friendly sliders. Using JS, I have done next-pre button‘s work, direct pagination function, and fetch and functioning years. Left all other things you will understand after getting the codes, I can’t explain all in writing.

For creating this program, you have to create 3 files for that. First for HTML, second for CSS, and the third for JavaScript. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The final step, Create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created a CSS Responsive Timeline Slider With Swiper JS, HTML CSS JS Timeline Design. If you have any doubt or question comment down below.

Thanks For Visiting, Keep Visiting.

8 COMMENTS

  1. Hello –

    Great work! Have you been able to get the breakpoint settings to update when you go from large screen to small and back to large again? I’m having some issues getting that to work. Cheers!

    • Boosting this question. Same issue here. I need to be able to add more dates to the slider. When I do, the numbers disappear off the div, and cover up the arrows. Not sure how to fix that. I suspect it’s not just a CSS issue, but also a js one.

  2. I love this so much! But I’m having trouble getting it to work on a bootstrap website. It doesn’t seem to be able to read the .js file. I’ve tried putting it in the header, just above /body, I’ve tried putting the code between tags above /body. But it’s just not working. It works fine in Codepen. Not sure what’s going on. Any ideas?

LEAVE A REPLY

Please enter your comment!
Please enter your name here