<section class="content">
<div class="row">
<aside class="hidden-xs hidden-sm col-md-1 col-lg-1 fixed-left-bar">
<span class="about">about</span>
</aside>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 content-container">
<div class="hidden-xs hidden-sm col-md-6 col-lg-6 background"></div>
</div>
<aside class="hidden-xs hidden-sm col-md-3 col-lg-3 fixed-right-bar">
</aside>
</div>
</section>
答案 0 :(得分:0)
这是因为.row
calss,左右两侧都有负边距。
.row {
margin-right: -15px;
margin-left: -15px;
}
将您的代码包裹在container
或container-fluid
类中。
<section class="content container-fluid">
<div class="row">
<aside class="hidden-xs hidden-sm col-md-1 col-lg-1 fixed-left-bar">
<span class="about">about</span>
</aside>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 content-container">
<div class="hidden-xs hidden-sm col-md-6 col-lg-6 background"></div>
</div>
<aside class="hidden-xs hidden-sm col-md-3 col-lg-3 fixed-right-bar">
</aside>
</div>
</section>