html - 水平溢出多个内联垂直列表

标签 html css overflow inline

我的网站底部有一个信息栏。它有几个水平显示的行内 block 元素。正如您在 fiddle 中看到的那样,当内联 block 元素中的信息在垂直方向上变得太大时,它会溢出到信息栏的底部边缘以下。我希望这些东西向右溢出,类似于报纸专栏。

jsfiddle:link

<div class="information-bar">
    <div class="information">
        <div class="title">Section Title</div>
        information <br />
        information2 <br />
        information3 <br />
        information4 <br />
        information5 <br />
    </div>
    <div class="information">
        <div class="title">Section Title</div>
        information <br />
        information2 <br />
        information3 <br />
        information4 <br />
        information5 <br />
    </div>
</div>

目标是改变这个:

enter image description here

为此:

enter image description here

我试过 css3 列方法:jsfiddle . 不幸的是,我认为它只适用于一列,因为会发生这种情况:

enter image description here

最佳答案

我想我明白了。然而,存在一个问题:当窗口太小时,第二组信息显示在下方。但我认为这不是什么大问题,因为它没有那么广泛。

.information-bar {
width:100%;
height: 100px;
background: #999;
position: absolute;
bottom: 0;
}

.information-bar .information {
display: block;
height: 95px;
-webkit-column-width:144px;
-webkit-column-gap:16px;
-moz-column-width:144px;
-moz-column-gap:16px;
column-width:144px;
column-gap:16px;
-moz-column-count:2;
-webkit-column-count:2;
column-count:2;
}
div.information
{
float:left;
width: 304px; /*quick math: 144*2+16=304*/
}

关于html - 水平溢出多个内联垂直列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17600644/

相关文章:

javascript - 选中时输入框移动

html - CSS - 溢出和定位

c - 黑客 - 剥削的艺术 : debugging buffer overflow example

swift - 为什么在将 8 位二进制值分配给 Int8 类型的 var 时,Swift 语言会发生溢出?

android - Android Webview 是否支持 CSS3 WebKit 动画?

html - 通过 CSS 隐藏列时如何修改 colspan 属性?

javascript - cookie 是否被视为 DOM 树的一部分?

jquery - CSS 响应式下拉菜单 - 分成两列

html - 按空格键向下滚动页面?

javascript - jQuery CSS 位置不工作