In css, how to click to switch the content?

in www.jd.id, there are the following floors

clipboard.png
]

you can click the button on the left and right to switch content. How can this be realized?

Jul.27,2021

two absolute positioning.
external uloverflow:hidden.
to switch content is to move the left or Rightvalue of the internal ul.


Baidu take a look at swiper, 's powerful touch slide module, which can sit on slides, commodity switching and many other special effects. For specific implementation, please refer to the official document


for the ides-per-group.html" rel=" nofollow noreferrer "> presentation document


.

I haven't written it for a long time, so the idea is to put it on a long scroll with a box in your hand.
first make the box and scroll equal, and then pull the scroll to the left and right, each time pulling a fixed length.
the idea of an infinite loop in PS: allows you to think of scrolls as stitchable. There are so many detailed implementations of
, so it would be better to write an article if you have time.
if it is pure CSS, you can't click and move. If it is realized by CSS, it can only be automatically rotated and realized through CSS animation.
it's interesting to think about it.

the basic idea is as follows:

// 
<div style="position: relative;display:inline-block;width: 300px;height:100px;overflow:hidden">
    // 
    <ul style="position: absolute;display:inline-block;width: 3000px;height: 100px;">
        ...
    </ul>
</div>
Menu