Some things for you to look at:
Javascript may not even be necessary, provided you use :hover
appropriately with the correct transitions/styling.
Edit:
For layering, use z-index
. I'm not sure how you want to position your elements, so come up with an algorithm for placing them (random would probably work fine). Once that's done, just use position: absolute
, setting top
and right
to the positions you generated.
Possible algorithms for placement:
- Random (easy peasy:
x = Math.random() * maxWidth - radius + centerX
), similar for y
- Fibonacci-based using Vogel's model- Ensures easy distribution
- Cluster similar images- this is a bit more difficult and depends on your clustering logic
I'm sure there are others. I'd recommend doing a simple one (random), getting everything working, then create a more interesting algorithm later if you want to.