2016-01-25 66 views
0

我習慣在引導3做這種伎倆來暫時中斷了電網的並顯示在整個瀏覽器寬度的行(可用於需要全寬彩色背景行):波本威士忌/整潔 - 如何突破網格顯示在全瀏覽器寬度行?

<div class="container" style="background-color:red"> 
    <div class="row"> 
     <div class="col-xs-12"> 

      <div class="container"> 
       <div class="row"> 
        <div class="col-xs-12"> 

         Content is displayed within the normal grid here 
         but within a full-width red background. 

        </div> 
       </div> 
      </div> 

     </div> 
    </div> 
</div> 

是否有在波旁/整潔這樣做的方法?

的方式,我目前正在處理這是我的核心要素設置indiividual風格,而不是在一個div容器:

header, 
main, 
footer { 
    @include outer-container; 
} 

而且我想成爲全寬的容器上:

nav { 
    @include outer-container(100%); 
} 

但我想知道是否有一個簡單的「突破」方式在內部嵌套元素上做到這一點。

+0

我在前幾天掙扎着。我的解決方案(不完美)是增加外部容器的最大寬度。 '@include outer-container(2160px);'。食物的思想。 – alecdwm

回答

0

這是我做我的頁腳:

HTML

<footer> 
     <div class="wrapper"> 

     </div> 
<footer> 

CSS

footer{ 
    background: $lightest-grey; 
} 

.wrapper{ 
    @include outer-container; 
} 

外部容器(.footer-包裝)將自身中心,以100%你的最大寬度。也許這可以幫助你。你可以在任何你喜歡的地方使用.wrapper。例如標題,英雄,你的主要容器。希望這會有所幫助

相關問題