我正在嘗試開發一個網站的定價部分,其中包含3個不同的價格。在最高層應該有一個標題和簡短說明,像「定價」,「定價方案:不使用行/列的副作用?
<section id="pricing">
<div class="container">
<h2>Pricing</h2>
<p>The pricing plans</p>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
</div>
</div>
</section>
現在,我見過的人把那應該是1行的東西/ 1列,直接在容器內,如上面如果我遵循了自舉「公約」的話,我會怎麼做:
<section id="pricing">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>Pricing</h2>
<p>Here are our pricing plans</p>
</div>
</div>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
</div>
</div>
</section>
但是,並沒有給單col-xs-12
reduntant行。如果你看到了什麼? source of the Bootstrap home page,你會發現<p>
標籤直接在container
之內。但是,在這裏,<h2>
和<p>
t ags不是容器內唯一的東西,它們之後有一排。
所以我的問題是,會有任何使用第一個例子與「遵循規則」和使用第二個例子的無意的副作用?