我有一个基于twitters bootstrap的流畅布局.
<div class="container-fluid"> <div class="row-fluid"> <div class="span2"> <!--Sidebar content--> </div> <div class="span10"> <!--Body content--> </div> </div> </div>
侧边栏的固定宽度非常好.如果将布局从流体更改为“静态”并将侧边栏的宽度设置为
220px
解决方法
我想你看起来像这样:
<div class="sidebar span4"> this is my fixed sidebar </div> <div class="main"> <div class="container-fluid"> <div class="row-fluid"> <div class="span2">this is fluid</div> <div class="span3 offset1">yeah!</div> <div class="span6">Awesome!</div> </div> <div class="row-fluid"> <div class="span6">1 half</div> <div class="span6">2 half</div> </div> </div> </div>
这里是方便你的小提琴:http://jsfiddle.net/TT8uV/2/
如一般说明:
You don´t need to use bootstrap as your ‘main container’,so you can place your
sidebar side-by-side with a grid system (like bootstrap
fluid and responsive). This way you have A LOT of control of the
sidebar,without affecting the actual content.
希望对你有效.