2017-02-15 110 views
0

我有一個jQuery Shapeshift插件的問題。我想在一行中有藍色,綠色和黃色塊,但是Shapeshift不適合。問題在哪裏,我該如何解決?jQuery Shapeshift插件。元素不適合排

HTML:

<div class="container"> 
    <div class="klocek1"></div> 
    <div class="klocek2"></div> 
    <div class="klocek3"></div> 
    <div class="klocek4"></div> 
</div> 

CSS:

.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; 
} 

JS:

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

的jsfiddle: http://jsfiddle.net/odu70g2t/2/

回答

0

我想你應該arrang e mininum colums財產相應地,例如在我的屏幕上,當我設置minumum colums時,它會正確填充行。 如下:

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

我希望這有助於

+0

我最小列集和我需要它1響應。即使3它仍然沒有工作。 – Edenwave