I have two divs with a special gradient background, and I need to create an S-Shape curve between them.

Here is an example script for gradient divs: https://jsfiddle.net/JerryGoyal/rjyfc46c/2/
<div id="section1"> </div> <div id="section2"> </div> #section1{ height:200px; background: linear-gradient(to bottom right, #ad3, #add); } #section2{ height:200px; background: linear-gradient(to bottom right, #de350b, #0065ff); }
There are a few things that crossed my mind, but:
- svg: don't know how to handle another gradient div.
- border-radius: failed to get a true S-like curve, and it becomes ugly when I change the screen size.
- clip path: not supported by some browsers https://caniuse.com/css-clip-path
- image png: no! must be dynamic content.
Any help would be appreciated!
PS: a must read for future readers: https://css-tricks.com/creating-non-rectangular-headers/
source share