[英]rails5-bootstrap-sass navbar responsiveness not working
Why is it that navbar responsiveness not working on Rails 5 . 为什么导航栏的响应能力不适用于Rails 5 。 I am using
bootstrap-sass
gem. 我正在使用
bootstrap-sass
gem。 I've already search on the internet and tried for possible solutions yet I got no luck. 我已经在互联网上搜索并尝试了可能的解决方案,但我没有运气。
Here is my /app/assets/stylesheets/application.css.scss 这是我的/app/assets/stylesheets/application.css.scss
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*
*
*/
@import "bootstrap-sprockets";
@import "bootstrap";
Any help is much appreciated! 任何帮助深表感谢!
Thanks, 谢谢,
I was having the same issue earlier. 我之前遇到过同样的问题。 I resolved it by adding these two lines in the
head
of application.html.erb
我通过在
application.html.erb
的head
添加这两行来解决它
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.