简体   繁体   中英

i want to make each section to scroll horizontally by clicking an arrow navigation?each section has infinite vertical scroll

now, i want to make each section to scroll horizontally by clicking an arrow navigation?each section has an infinite vertical scroll.

1.navigation arrow to navigate to horizontal scroll.

<a class="arrow arrow-left" role="button"></a>    

2.starts content.

<section class="timeline" id="1">infinite content..</section>
<section class="timeline" id="2">infinite content..</section>
<section class="timeline" id="3">infinite content..</section>
<section class="timeline" id="4">infinite content..</section>

<a class="arrow arrow-right" role="button"></a>

.timeline{
    position: relative;
    margin: 30px auto;
    width: 100%;
}
.arrow {
    width: 0; 
    height: 0; 
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    position: absolute;
}

.arrow-right {
    border-left: 15px solid #000;
    right: 0;
}
.arrow-left {
    border-right: 15px solid #000; 
    left: 0;
}

Have a look at Jquery Animate() function.

Here you can define your timeline section to scroll left and right according to the arrow clicked

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM