我想列出一些數據和由垂直線分離的圖形。 這是我做已經:如何在CSS中使用豎線分隔的圖形和列?
HTML:
<div class="containers vertical-divider">
<div class="column one-third">
<h1 class="span glyphicon glyphicon-th"></h1>
</div>
<div class="column two-thirds">
<h3>Title</h3>
<p>consectetur adipiscing elit. Donec sit amet vestib.</p>
</div>
<div class="column two-thirds">
<h3>Details</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipis.</p>
</div>
<div class="column one-third">
<h1 class="glyphicon glyphicon-pencil"></h1>
</div>
<div class="column one-third">
<h1 class="glyphicon glyphicon-remove"></h1>
</div>
</div>
<hr>
CSS:
.vertical-divider{
clear: both;
position: relative;
}
.vertical-divider:after {
clear: both;
content: " ";
display: block;
height: 0;
visibility: hidden;
}
.vertical-divider .column:not(:first-child):after, .vertical-divider .columns:not(:first-child):after{
background: #DDDDDD;
bottom: 0;
content: " ";
margin-left: -10px;
position: absolute;
top: 0;
width: 1px;
}
/* Very simple grid for example */
.containers { position: relative; width: 960px; margin: 20px auto; padding: 0; }
.containers .column, .containers .columns { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
.containers .one-third.column { width: 50px; }
.containers .two-thirds.column { width: 250px; }
小提琴:http://jsfiddle.net/xxpe6fnw/
正如你所看到的問題是與右側glyphicons ,每列中的寬度也不響應。
如果有人有更好,更容易的想法得到相似的結果(也許使用一些引導功能?),然後我在聽。
感謝您的回覆。但它太醜陋了,寬度仍然沒有反應。 – DiPix