How to make a masonry layout grid in bootstrap 3?

后端 未结 3 443
一整个雨季
一整个雨季 2020-12-21 09:33

I am using boostrap to make a masonry layout. But I am having a problem. As you can see in my code, I have 5 divs. I want Div 4 and 5 to move up(check the attached image) bu

3条回答
  •  星月不相逢
    2020-12-21 10:05

    you can do it this way:

    // external js: masonry.pkgd.js
    
    $('.grid').masonry({
      itemSelector: '.grid-item',
      columnWidth: '.grid-sizer',
      percentPosition: true
    });
    
    
    
      
      
      
      
    
    
    
      

提交回复
热议问题