Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 像密集的街区?_Javascript_Jquery_Jquery Masonry - Fatal编程技术网

Javascript 像密集的街区?

Javascript 像密集的街区?,javascript,jquery,jquery-masonry,Javascript,Jquery,Jquery Masonry,请帮忙解决这个问题。对于密集的填充块,我使用了一种流行的插件砌体 我的结果不起作用。但是我使用了 css: 你的小提琴参考了图书馆 对于此语法(): 使用链接到的文档中的as $('#container').masonry({ itemSelector: '.box', // set columnWidth a fraction of the container width columnWidth: function( containerWidth ) { return co

请帮忙解决这个问题。对于密集的填充块,我使用了一种流行的插件砌体

我的结果不起作用。但是我使用了

css:


你的小提琴参考了图书馆

对于此语法():

使用链接到的文档中的as

$('#container').masonry({
  itemSelector: '.box',
  // set columnWidth a fraction of the container width
  columnWidth: function( containerWidth ) {
    return containerWidth / 5;
  }
});
#container{
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

    #container .item{
        width: 33.3%;
        background: red;
        float: left;
    }
$('#container').masonry({
  itemSelector: '.box',
  // set columnWidth a fraction of the container width
  columnWidth: function( containerWidth ) {
    return containerWidth / 5;
  }
});