Bootstrap:如何讓網站始終以“lg”運行 - Bootstrap: how to Make the website always operate as “lg” -开发者知识库

Bootstrap:如何讓網站始終以“lg”運行 - Bootstrap: how to Make the website always operate as “lg” -开发者知识库,第1张

I have a fully responsive website with the classes hidden-*, visible-* are being used extensively, now i want to let the mobile users to be able to use the desktop version of the website if they click on a button like "Desktop Website".

我有一個完全響應的網站,隱藏的類 - *,visible- *被廣泛使用,現在我想讓移動用戶能夠使用網站的桌面版本,如果他們點擊像“桌面網站”這樣的按鈕”。

These are Bootstrap documentations for Disabling Responsiveness:


  1. Omit the viewport mentioned in the CSS docs.
  2. 省略CSS文檔中提到的視口。
  3. Override the width on the .container for each grid tier with a single width, for example width: 970px !important; Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important with media queries or some selector-fu.
  4. 使用單個寬度覆蓋每個網格層的.container上的寬度,例如width:970px!important;確保這是在默認的Bootstrap CSS之后。您可以選擇使用媒體查詢或某些selector-fu來避免使用!important。
  5. If using navbars, remove all navbar collapsing and expanding behavior.
  6. 如果使用導航欄,請刪除所有導航欄折疊和展開行為。
  7. For grid layouts, use .col-xs-* classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.
  8. 對於網格布局,請使用.col-xs- *類作為中/大類的補充或替代。不用擔心,超小設備網格可以擴展到所有分辨率。

I tried it but it's not working!.


The Media Queries still operational.


The hidden-* and visible-* still operational.

隱藏 - *和可見 - *仍然可操作。

So nothing happened, the responsiveness still operational!.


I don't know why it's a difficult thing to do. The website is already configured to run on desktop devices, so i just need to tell the Mobile or Tablet to browse the website like a Desktop does. Is there any way to do that ?


Thanks in advance.


2 个解决方案



Perhaps the best approach for you would be to compile a separate version of Boostrap without any of its responsive goodies. Check this blog entry on how to do that. Let me know if that helped/worked. Fabio