I want to create a div
with a style
that clips all children's bounding boxes to a certain region(and simply cropping out anything not in the bounding box). In my case, a child is using the background-position
CSS property to position itself(and I want to clip this element). I've tried doing the following:
Setting the
width
andheight
properties of thediv
to the bounding box, and settingoverflow
tohidden
.Setting the
clip
property of thediv
Neither has worked. Any ideas on alternate approaches?