我有這6列浮動到左邊,所以他們會出現在彼此旁邊,但正如你可以看到演示一旦我增加中間內容的高度4和6也推下來,但我想保持相同的利潤率爲什麼我得到我的內容之間的這個很大的差距
CSS
.left-side-bar{
clear: both;
height: 200px;
width: 32.26%;
background-color: gray;
text-align: center;
float: left;
margin-top: 1%;
}
.middle-side-bar{
height: 340px;
width: 32.26%;
background-color: blue;
text-align: center;
float: left;
margin: 1% 0 1% 1.6%;
}
.right-side-bar{
height: 200px;
width: 32.26%;
background-color: yellow;
text-align: center;
float: left;
margin: 1% 0 1% 1.6%;
}
這些內容可以有不同的高度。這只是對這個問題,我可能有超過6列
正確的小提琴 enter link description here
你在說什麼六列?提琴提供的不符合你的描述 – 2014-12-27 13:28:47
我認爲他是在問砌石 – himanshu 2014-12-27 13:43:13
http://sickdesigner.com/masonry-css-getting-awesome-with-css3/它會幫助,如果你正在尋找砌體的css – himanshu 2014-12-27 13:47:35