sticky stacking cards on scroll + kill border white space

STACKING EFFECT:
- Cards use position: sticky with increasing top offset (72-120px)
- z-index layering (10-40) so later cards stack on top
- pb-36 between cards for scroll breathing room
- will-change-transform for smooth compositing

WHITE SPACE FIX:
- Removed border border-gray-200 (was creating visible white gap)
- Replaced with shadow-[0_2px_8px_rgba(0,0,0,0.08)] for depth
- Switched from CSS Grid to flexbox (flex-row/flex-row-reverse)
- Image fills full card height via flexbox stretch

LAYOUT:
- md:w-7/12 for image, md:w-5/12 for text
- min-h-[400px] on desktop for substantial card presence
- Alternating image left/right preserved for visual rhythm
This commit is contained in:
2026-03-03 22:55:03 +08:00
parent 233e9320b5
commit dc1253af33
3 changed files with 46 additions and 44 deletions

BIN
stack1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 KiB