You should take a look at using CSS cropping / masking methods for your purpose.
In particular, you can specify the boundaries that you want to achieve using some SVG definitions:
<svg> <defs> <mask id="masking"> <rect width="300" height="300" fill="white"/> <ellipse rx="150" ry="10" cx="150" cy="300" fill="black" /> </mask> </defs> </svg>
And link to this mask in CSS using:
#your-div { mask: url('#masking'); }
I created a small example demonstrating this in the following fiddle. It still needs to be tweaked a bit to be more flexible when it comes to different sizes, but it should light you up like this: http://jsfiddle.net/m8fo5zbk/
UPDATE: after the fiddle, the scrolling behavior of http://jsfiddle.net/m8fo5zbk/2/ is also displayed - did I understand correctly what you intended?
2nd UPDATE: Now itβs clear that the content should be placed inside the div, reflected in this demo: http://jsfiddle.net/m8fo5zbk/3/
source share