I'm searching for an elegant way to make non-horizontal section transition in my HTML (Bootstrap) page.
It should work on mobile and also with video- or parallax backgrounds.
Do you have any suggestions?
I'm searching for an elegant way to make non-horizontal section transition in my HTML (Bootstrap) page.
It should work on mobile and also with video- or parallax backgrounds.
Do you have any suggestions?
I see two approaches avaiable:
<div style="height: 200px; overflow: auto; background-image: your-image.png"></div>
clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
You can se more about clip-path here: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-pathFinally I would choose the first approach. because is more scalable and easier to implement, in the future if you want to change the shape, just redraw it in some software of you choice, on the other hand with clip-path you would have to rethink all the points and where to put them.