【问题标题】:Aligining divs side by side with no gap css将 div 并排对齐,没有间隙 css
【发布时间】:2013-10-16 14:50:03
【问题描述】:

我让循环生成的 div 并排对齐,

但是第一个和第四个 div 之间有差距,我该如何消除这个差距?请帮忙..

我的 div 的图片在这里

我已将 css 添加为

.div_class {
    bottom: 0;
    display: table-cell;
    left: 0;
    position: relative;
    vertical-align: top;
    float: left;
    height: auto !important;
    overflow: hidden;
    width: 300px;
}

编辑: 这是fiddle

【问题讨论】:

  • 使用jquery masonry插件来实现这个
  • 如果你能在小提琴中展示你的问题会更有帮助
  • 尝试重置margin:0, padding: 0
  • 你能在图片上标出这个空隙吗?我不确定我们在说什么
  • 尝试同位素布局..希望对您有所帮助...isotope.metafizzy.co

标签: css


【解决方案1】:

看看这个 jQuery 插件:

masonry
isotope

这些插件还可以做到这一点。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-15
    • 2022-11-19
    • 1970-01-01
    • 2014-11-10
    • 1970-01-01
    • 2011-06-23
    • 2014-06-28
    • 2020-08-12
    相关资源
    最近更新 更多