简体   繁体   中英

Making Twitter Bootstrap 2.0's responsive layout completely fixed

The Twitter Bootstrap 2.0-wip branch on GitHub includes a new responsive layout system. It's great for apps that need that level of responsiveness, but I'm developing a web-only app that needs to have a completely fixed layout.

Is there any easy way to override Bootstrap's responsive layout?

You can see it in action by cloning their repo, branching to 2.0-wip , and opening docs/scaffolding.html in your browser.

Thanks in advance!

Note, in 2.0.1+ the responsiveness has been moved to its own file, so it is turned off by default. To turn it on you include bootstrap-responsive.css or responsive.less. http://twitter.github.com/bootstrap/scaffolding.html#responsive

Just remove the @media queries found in the bootstrap.css file on line 2684 . That should eliminate all of the responsive qualities and just leave the standard container width intact.

@media (min-width: 768px) and (max-width: 940px) { ..... }

Just compile your own custom bootstrap on http://twitter.github.com/bootstrap/customize.html , unticking the responsive features.

Alternatively you can include following file from BootstrapCDN: http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap.min.css

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM