为什么导航栏响应无法在Rails上工作 5 。我正在使用bootstrap-sass
gem。我已经在互联网上搜索并尝试了可能的解决方案,但我没有运气。
这是我的 /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";
非常感谢任何帮助!
谢谢,
答案 0 :(得分:0)
我之前遇到过同样的问题。我通过在head
application.html.erb
中添加这两行来解决这个问题
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0">