为什么导航栏响应在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";
任何帮助深表感谢!
谢谢,
最佳答案
我之前也遇到过同样的问题。我通过在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">
关于css - rails5-bootstrap-sass导航栏响应不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38735311/