或者他們是?當我在任何引導組件上使用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