gpt4 book ai didi

css - rails 5-bootstrap-sass 导航栏响应不工作

转载 作者:行者123 更新时间:2023-12-02 04:39:21 25 4
gpt4 key购买 nike

为什么 navbar responsiveness 在 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";

非常感谢任何帮助!

谢谢,

最佳答案

我之前遇到过同样的问题。我通过在 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">

关于css - rails 5-bootstrap-sass 导航栏响应不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38735311/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com