You can perhaps play with border-radius and :before, :after psuedo elements to achieve something like this. The amount of curve can get would be limited.. but it's achievable nonetheless.
Try adding a border-radius to make the div edges rounded and use :before and :after with their own border-radius and a background to make up for the top and the bottom curve.
upvote if it helps :)