改变砌体布局的顺序

时间:2017-07-10 18:46:23

标签: html css twitter-bootstrap

我有自举模板,它包含一个砖石外观(非js)布局。我的问题是列表中的项目是垂直排序的。

这就是现在列表的样子:

1. item  3. item  5. item
2. item  4. item  6. item

这就是我想要实现的目标:

1. item  2. item  3. item
4. item  5. item  6. item

我对css不太熟悉,所以如果有人能告诉我我应该在css中改变什么以使其按照我的意愿工作,我真的很感激。

以下是css的相关部分:

.container-masonry ol{
    clear: both;
    -moz-column-count: 4;
    -moz-column-gap: 0px;
    -webkit-column-count: 4;
    -webkit-column-gap: 0px;
    column-count: 4;
    column-gap: 0px;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
    z-index: 2;
    margin-left: -10px;
}

.container-masonry ol li.item-masonry{
    display: inline-block;
    list-style: none;        
    width: 100%;
}
.the-box.mansory-inner                  {margin: 10px;}
.the-box.mansory-inner img              {width: 100%;margin: 0;}
.the-box.mansory-inner.with-padding     {padding: 10px;}

0 个答案:

没有答案