Can you please review the image I've attached? What I'm looking to achieve is having a Rectangle (imagine it as a div) with a background-image (chess-pattern) that matches the parent image. The key here is for the child (Black Rect) to display only the portion of the background-image that overlaps with the parent, in order to apply additional effects like blur.
I've been wondering if there's a CSS trick to:
- Show only the clipped part of an image where it intersects with the parent (or even the entire body); or
- Create a dynamic CSS function to determine its own position and calculate the image-position it should display (e.g., something similar to
)background-position: [Position-X-Of-Div] 100px;
I appreciate any help on this matter! Feel free to ask if anything is unclear.
If achieving this isn't possible, I'm open to switching to SASS or LESS.