
This example is what I want. I am wondering is that possible to display img1, img2 and img3 based on their distance to the center image?(Say I know the distance between img1 and center is 2, img2 to center is 3, img3 to center is 1)

This example is what I want. I am wondering is that possible to display img1, img2 and img3 based on their distance to the center image?(Say I know the distance between img1 and center is 2, img2 to center is 3, img3 to center is 1)
You'll need to use JavaScript to write inline CSS for you. The D3.js library is wonderful for building these type of diagrams.
Here is a similar example from the D3.js website: http://bl.ocks.org/couchand/6420534
More examples here: https://github.com/mbostock/d3/wiki/Gallery
I think it is possible. Know the center image position and make it absolute. let the other image distances be relative to it.