How to create a simple slider
How to build a simple slider
Markup
Markup for slider is very simple. We are going to create div with id slider as main container, and then div with class slides-container which is going to hold all the slides. We then just need another div that’s going to hold arrows and another that will act as pager. Markup for slider is very simple. We are going to create div with id slider as main container, and then div with class slides-container which is going to hold all the slides. We then just need another div that’s going to hold arrows and another that will act as pager. Markup for slider is very simple. We are going to create div with id slider as main container, and then div with class slides-container which is going to hold all the slides. We then just need another div that’s going to hold arrows and another that will act as pager.
Styles
It will be all very messed up. Another important thing here is postion: relative
because we
need to set slides to position: absolute
. That way they are one beneath another and we will
have smooth fade in-out transition.
WWF's goal is to: Build a future where people live in harmony with nature.