How can I make an image carousel with only CSS?

后端 未结 6 576
鱼传尺愫
鱼传尺愫 2020-12-02 04:11

I\'m looking to make an image carousel, where a user can toggle between images, by clicking on arrows. For example:

6条回答
  •  情书的邮戳
    2020-12-02 04:24

    Why not making it smooth and nice looking with only CSS?

    Picnic CSS 4.0 Tabs

    This is part of a library I created, Picnic CSS. However, that jsfiddle includes the library and all of the plugins for the next version (4.0 is being finished now). You can see the current 3.x version of the same plugin here, which also fulfills all of your requirements, but it's not so smooth as I'd like:

    Picnic CSS 3.x Tabs

    Right now you can only see the scss source code in the dev branch but it is scheduled to be released in the following days, so I'll update my answer.

    Some code please! This is the HTML that you need for the 4.0 version, as others commented, you basically play with and to achieve the desired effect:

    Super important notice!

    Thank you for registering! By doing so you agree to the Terms and conditions

    Your basic data

    Create account

提交回复
热议问题