或者他们是?当我在任何引导组件上使用inspect元素时,它将从application.css(不是bootstrap本身)获取CSS。我很确定我在安装时做了错误的事情,尽管我经历了几次指导。Bootstrap v4在Rails中安装问题
忘记我用Rails 4.2.6和使用宝石从补充: https://github.com/twbs/bootstrap-rubygem#a-ruby-on-rails
这是我的意思,例如BTN类工作,但他们并不指向来引导在检查元素而是应用于application.css。此外,导航栏(从getbootstrap.com复制粘贴)的作品尽可能的JavaScript下拉走,但CSS关闭。
的Gemfile
#Bootstrap V4 Alpha
gem 'bootstrap', '~> 4.0.0.alpha6'
* sprockets-rails (3.2.0)
application.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 styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*/
@import "bootstrap";
的application.js
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap
感谢您的答复,我试过但没有改变。 – Dotol