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:

這些是用於禁用響應的Bootstrap文檔:

  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 个解决方案

#1


1  

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

也許對你來說最好的方法是編譯一個單獨版本的Boostrap而沒有任何響應好的東西。查看此博客文章,了解如何執行此操作。如果有幫助/有效,請告訴我。法比奧

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复