Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/411.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.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 jqueryshapeshift插件。元素不适合行_Javascript_Jquery_Css_Drag And Drop - Fatal编程技术网

Javascript jqueryshapeshift插件。元素不适合行

Javascript jqueryshapeshift插件。元素不适合行,javascript,jquery,css,drag-and-drop,Javascript,Jquery,Css,Drag And Drop,我对jQuery Shapeshift插件有问题。我想把蓝色、绿色和黄色的积木排成一行,但变形不适合。问题在哪里?我如何解决 HTML: JS: JSFiddle: 我认为您应该相应地安排mininum colums属性,例如,在我的屏幕中,当我设置mininum colums时,它会正确地填充该行。 详情如下: $(".container").shapeshift({ minColumns: 3 }); 我希望这有帮助我设置了最小列数,我需要它为1来响应。即使3它仍然不起作用。 .con

我对jQuery Shapeshift插件有问题。我想把蓝色、绿色和黄色的积木排成一行,但变形不适合。问题在哪里?我如何解决

HTML:

JS:

JSFiddle:

我认为您应该相应地安排mininum colums属性,例如,在我的屏幕中,当我设置mininum colums时,它会正确地填充该行。 详情如下:

$(".container").shapeshift({
  minColumns: 3
});

我希望这有帮助

我设置了最小列数,我需要它为1来响应。即使3它仍然不起作用。
.container {
  border: 1px dashed #ccc;
  position: relative;
  width: 100%;
}

.container .ss-placeholder-child {
  background: transparent;
  border: 1px dashed red;
}

.klocek1 {
  width: 600px;
  height: 600px;
  background: yellow;
  position: absolute;
}

.klocek2 {
  width: 600px;
  height: 300px;
  background: red;
  position: absolute;
}

.klocek3 {
  width: 300px;
  height: 600px;
  background: green;
  position: absolute;
}

.klocek4 {
  width: 300px;
  height: 600px;
  background: blue;
  position: absolute;
}
$(".container").shapeshift({
  minColumns: 1
});
$(".container").shapeshift({
  minColumns: 3
});