How do I create floating blocks that can be pushed with the cursor?
I have about 15 different small pictures, I need them not to be attached to a specific point on the page, but to be able to "float" around the entire delimiter block.
I attach a somewhat similar example below. But this is an example of interconnected blocks, and they only react to the mouse through dragging. And I need to be able to "push" them back and forth with the cursor.
I hope I made it clear.
Well, what's so hard about it?
You have an example of positioning such blocks.
Hang up a handler on the mouseenter event, look at the coordinates of the mouse, the coordinates of the current block, and move it.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!