如何使用twitter-bootstrap-rails gem禁用部分Twitter Bootstrap响应式设计?

[英]How do I disable a portion of Twitter Bootstrap responsive design using twitter-bootstrap-rails gem?


I'm currently building a Ruby on Rails app and I am using the twitter-bootstrap-rails gem and have started making heavy modifications to the responsive layout using @media css calls. However, to maintain a specific type of formatting, I'd like to disable the large desktop @media (min-width 1200px). I understand how to do this via the normal Twitter Bootstrap process, but would prefer to maintain the twitter-bootstrap-rails gem.

我目前正在构建一个Ruby on Rails应用程序,我正在使用twitter-bootstrap-rails gem,并开始使用@media css调用对响应式布局进行大量修改。但是,为了维护特定类型的格式,我想禁用大型桌面@media(min-width 1200px)。我知道如何通过正常的Twitter Bootstrap过程来做到这一点,但更喜欢维护twitter-bootstrap-rails gem。

If something could please direct me on which file to add to my assets/stylesheets or how to modify the @ call, I'd greatly appreciate it!

如果有什么可以请指导我添加到我的资产/样式表的文件或如何修改@调用,我将非常感谢!

I'm looking to find the cleanest way to do this so when I upgrade the gem it doesn't impact the other files. Thanks!

我想找到最干净的方法,所以当我升级gem时它不会影响其他文件。谢谢!

1 个解决方案

#1


3  

I assume your layout will be enclosed in a container-fluid and that you have some final level css for site specific styling.

我假设您的布局将封装在容器流体中,并且您具有针对特定于站点的样式的最终级别css。

How about putting this in your lowest level css

把它放在最低级别的css怎么样?

/*
* container
*/
.container-fluid {
  max-width: 1200px;
}

Set the max width to the maximum size you want and dont bother hacking about with bootstrap.

将最大宽度设置为您想要的最大尺寸,并且不要打扰使用bootstrap进行攻击。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2013/02/07/41025c5586f89d0dc7231b526a39d60b.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号