0
大家都知道960/940px網格系統。我必須做一個佈局一些span元素之間的邊界,即在網格系統/自舉網格中的跨度邊緣內放置邊框或線條
[margin | span2] [mar... + border + ...gin][span2]
我的意思是,邊框/分割線應該在兩個橋跨的中間,但內間距保證金。
如果可能的話,它應該是沒有圖像的解決方案。
大家都知道960/940px網格系統。我必須做一個佈局一些span元素之間的邊界,即在網格系統/自舉網格中的跨度邊緣內放置邊框或線條
[margin | span2] [mar... + border + ...gin][span2]
我的意思是,邊框/分割線應該在兩個橋跨的中間,但內間距保證金。
如果可能的話,它應該是沒有圖像的解決方案。
這個想法是如何尋找初學者的?
http://jsfiddle.net/panchroma/8FEap/
您將類.borderLeft的跨度,如果你想有一個邊界,以它的左邊
<div class="row">
<div class="span6">span6</div>
<div class="span3 borderLeft">span3</div>
<div class="span3 borderLeft">span3</div>
</div><!-- end row -->
,並使用這個CSS
.borderLeft {
/* use border-box so border is applied inside the span and doesn't break the grid */
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
/* define your border */
border-left: 2px solid red;
/* remove the default bootstrap padding */
margin-left:10px !important;
/* make final adjustments to restore padding to span */
padding-left:10px;
margin-right:10px !important;
}
酷,謝謝!這樣可行。 –
太棒了,祝你的項目好運 –