在這裏,我已經從這個要點中拿走了'no-gutter'類:https://gist.github.com/berfarah/b50c9e8872c9c44044dc我通過搜索google找到了「gutterless row boostrap css 3」。 「陰溝」是列之間空間的佈局術語。其他框架可以有一個gutterless CSS類內置的。
<div class="navbar navbar-fixed-top navbar-default">
<div class="container">
<div class="navbar-header"><a class="navbar-brand" href="#">Project name</a><a class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="glyphicon glyphicon-bar"></span>
<span class="glyphicon glyphicon-bar"></span>
<span class="glyphicon glyphicon-bar"></span>
</a>
</div>
<div class="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a>
</li>
<li><a href="#about">About</a>
</li>
<li><a href="#contact">Contact</a>
</li>
</ul>
</div>
<!--/.navbar-collapse -->
</div>
</div>
<div class="container">
<div class="row no-gutter">
<div class="col-md-3">
<div class="sidebar-nav-fixed affix">
<div class="well">
<ul class="nav ">
<li class="nav-header">Sidebar</li>
<li class="active"><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
</ul>
</div>
<!--/.well -->
</div>
<!--/sidebar-nav-fixed -->
</div>
<!--/span-->
<div class="col-md-6">
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It
includes a large callout called the hero unit and three supporting pieces
of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-lg">Learn more »</a>
</p>
</div>
</div>
<!--/span-->
<div class="col-md-3">
<div class="sidebar-nav-fixed pull-right affix">
<div class="well">
<ul class="nav ">
<li class="nav-header">Sidebar</li>
<li class="active"><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
</ul>
</div>
<!--/.well -->
</div>
<!--/sidebar-nav-fixed -->
</div>
<!--/span-->
</div>
<!--/row-->
<footer>
<p>© Company 2012</p>
</footer>
</div>
<!--/.fluid-container-->
<style>
body {
padding-bottom: 40px;
padding-top: 60px;
}
.sidebar-nav-fixed {
/*width:14%;*/
width:100%
}
.no-gutter.row,
.no-gutter.container,
.no-gutter.container-fluid{
margin-left: 0;
margin-right: 0;
}
.no-gutter>[class^="col-"]{
padding-left: 0;
padding-right: 0;
}
</style>
聽起來像你想刪除的排水溝? https://julienmelissas.com/no-gutter-column-trick-for-bootstrap/哪個版本的bootstrap? – admcfajn
bootstrap-3.3.7-dist –
沒有人可以確切嗎? :( –