Войти

Вторая запись после долгого перерыва

на сайт, и вы сможете вступить в группу.

Вторая запись после долгого перерыва

 

Вертикальное фото, отрабатываем разные варианты

jQuery Masonry is the most popular solution to pull off this type of layout. It utilizes some pretty fancy JavaScript to reflow a series of divs.

Putting Masonry into practice is pretty easy, all you need is a container that holds a series of divs that you want to arrange masonry style. You can place anything you want inside the divs, in this case I threw in some placeholder images.

Once you have that in order, toss in jQuery and jQuery Masonry. Then you need to create a simple function that identifies your container and targets the class that we used for our Masonry images divs. Here’s a basic example

 

Masonry is a dynamic grid layout plugin for jQuery. Think of it as the flip-side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically, positioning each element in the next open spot in the grid.

The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall. This project lives on GitHub

Всего просмотров: 43, Сегодня: 1
Один комментарий

Оставить комментарий

Авторизация
*
*