Вопрос

I am curious about one interesting and creative feature in this stackexchange page, which lists out all the stackexchange sites in grid style.

When I click on one site box, it will grow bigger and its surrounding boxes will be rearranged to fit in the whole picture.

How does the rearrangement algorithm work? Any ideas?

Это было полезно?

Решение

Well judging by the source code they are using jQuery isotope plugin, its source code is here. You might also want to take a look at masonry.

Here you can find some explanation on how it can be done: http://benholland.me/javascript/how-to-build-a-site-that-works-like-pinterest/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top