Bootstrap没有任何样式 [英] Bootstrap is not styling anything

查看:293
本文介绍了Bootstrap没有任何样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Bootstrap,但由于某种原因,它不是造型任何东西。

I am using Bootstrap but it is not styling anything for some reason.

我已经尝试将窗体和navbars的bootstrap代码粘贴到我的主页视图,它只是显示正常没有引导样式。

I've tried pasting the bootstrap code for forms and navbars into my home view and it just shows like normal without the bootstrap styling.

我有

@importbootstrap;在我的样式表

@import "bootstrap"; in my stylesheet

和适当的宝石在我的Gemfile。有没有一些部分的设置,我忘了?或者为什么它不工作。

and the appropriate gems in my Gemfile. Is there some part of the setup that I am forgetting? Or why would it not be working. I've used it in past projects just a few days ago but not sure why it is not styling anything this time around.

这是我的GEM文件:

source 'https://rubygems.org'


gem 'bootstrap-sass', '~> 3.1.1'

gem 'simple_form'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.3'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development


推荐答案

application.css文件到application.css.scss这是我的问题:/修正现在虽然!

I didn't rename my application.css file to application.css.scss this was my problem :/ Fixed now though!

这篇关于Bootstrap没有任何样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆