2014-02-25 30 views
0

我遇到了很大的問題。我在我的網站中使用引導版本3.1.1,並且我想在這個項目中禁用引導程序的響應,但我不能!爲什麼我無法在我的項目中禁用響應式引導

這是HTML:

<div class="container"> 
      <div class="row"> 
       <div class="col-md-9" style="background-color: yellow;">col left</div> 
       <div class="col-md-3" style="background-color: pink;">col right</div> 
      </div> 
     </div> 

這是我的自定義CSS:

body { 
    background-color:#fdfdfd !important; 
    font-family:Arial, Tahoma !important; 
    min-width: 1024px !important; 
} 
.container { 
    max-width: none !important; 
    width:1024px !important; 
    background-color:#fff !important; 
} 

刪除頁眉頁

<meta name="viewport" content="width=device-width, initial-scale=1"> 

meta標籤,但是當我在Firefox測試我的網站, chrome ...當我調整瀏覽器的寬度時,元素div「容器」的大小是固定的。但是導航菜單,網格系統是響應式的。爲什麼?請幫幫我。

對不起,因爲我的英文不好!

非常感謝!

+0

[如何刪除Twitter Bootstrap 3中的響應功能?](http://stackoverflow.com/questions/17935601/how-to-remove-responsive-features-in-twitter-bootstrap-3) –

+0

http://getbootstrap.com/getting-started/#disable-responsive – soyuka

回答

0

Docs

  1. 省略的CSS文檔
  2. 覆蓋的width.container與單一寬度每個網格層級提到視<meta>,例如width: 970px !important;確保此自帶的默認引導CSS以後。您可以選擇避免使用媒體查詢!important或選擇器fu。
  3. 如果使用導航欄,請刪除所有導航欄摺疊和展開行爲。
  4. 對於網格佈局,使用.col-xs-*類作爲補充或替代中型/大型網格的類。別擔心,超小型設備網格可以擴展到所有分辨率。
+0

你有沒有關於「如果使用導航欄,刪除所有導航欄摺疊和擴展行爲」的例子,我不明白這一點,謝謝@dotty! –

相關問題