Skip to content
Advertisement

How to place items in specified position in drop in javascript

I have five images in my code, I want to drop these such that it is dropped in the desired position(circular position) in the dropped area.

ie,

when the five images are dropped it should form a circle shape rather than a straight line

How to achieve this?

JavaScript
JavaScript
JavaScript

Advertisement

Answer

Use nth-child() to #div1 img and set position to each image with top/left

also use position:absolute to img and position:relative; to #div

JavaScript
JavaScript
JavaScript
Advertisement