1
我使用bulma.css作爲佈局,但是當我給一個邊界時,我發現它的重疊。布爾瑪重疊的項目
這裏是重疊:
的.shop DIV似乎 '預期'
但.basket DIV似乎蠕動了一下。
和HTML:
<div id="app">
<div class="container">
<div class="shop">
<div class="columns">
<div class="column is-one-quarter product">
<h3 class="title is-4">Cat</h3>
<p>
£<span>2.99</span></p>
<div><button class="button">Add to basket</button></div>
</div>
<div class="column is-one-quarter product">
<h3 class="title is-4">Dog</h3>
<p>
£<span>4.00</span></p>
<div><button class="button">Add to basket</button></div>
</div>
</div>
</div>
<div class="basket">
<h1>Basket</h1>
<table class="table">
<thead>
<tr>
<td>Item</td>
<td>Quantity</td>
<td>Price</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">No items in the basket</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
CSS:
// All of bulma.css
html,body{
height:100%;
padding:20px;
}
.product{
box-sizing:border-box;
border:2px solid #eaeaea;
padding:20px;
}
我認爲它是與... Flexbox的?我不確定!
感謝您的指針。這是如何發生的,但我發現原因。在'.columns'內部的'.column'上的填充抵消了這個負邊界。所以答案就是將我的'.product' div放在列中,而不是意外地覆蓋'.column'樣式。 https://github.com/jgthms/bulma/issues/1047 – Djave