Can you create a carousel in a .container, but with visible overflow with plain CSS?
In swiper you can do this:
https://codepen.io/Lko3001/pen/ByaqxZr
So basically have some slides in side a container, but still have them overflow, is this possible to do with simple css?
7 Replies
You cannot do swipe with just CSS, but you can use scroll-snap
@Tok124 (CSS Nerd) I know you can't swipe, that's fine, the point is, can I replicate, in a scroll container, the overflow you see on the right? but still keeping them in the
.container
?Nah, you cannot make it exactly like that, the content that is overflowing will be hidden until you scroll to it
Ok thanks, apparently there are people already discussing about it https://github.com/w3c/csswg-drafts/issues/7246
GitHub
[css-overflow] How does overflow-clip-margin: border-box behave on ...
Usually the border of the scrollable area is outside. What should happen on a scrollable box when you set overflow-clip-margin: border-box? Are you supposed to make the contents overlap the border ...
do please also remember https://shouldiuseacarousel.com/
I have them too, but designers have the power
fair enough