A technical walkthrough of building a folded corner hover effect using CSS clip-path. The technique layers three elements: a cropped image using polygon clip-path, a white triangle pseudo-element representing the fold, and a shadow triangle for depth. CSS custom properties keep the code clean and enable smooth transitions between states. The shadow blur workaround involves stacking multiple decorative divs with incremental offsets since filter:blur() doesn't work with clip-path. The sibling-index() CSS function could simplify the shadow code but lacks Firefox support. Limitations include manual value tweaking, lack of curves, and the need for extra DOM elements for the blur effect.

6m read timeFrom kittygiraudel.com
Post cover image
Table of contents
❦ On this pageCropping the image §Creating the fold §Adding a shadow §Animating the effect §Wrapping up §

Sort: