rails twitter-bootstrap-rails
2013-12-18 11:41
190 查看
1、首先安装 gem'twitter-bootstrap-rails' ,运行bundle install2、初始化
rails generate bootstrap:install less生成assets/stylesheet/sbootstrap_and_overrides.css.less文件此时需要安装gem"less-rails".该文件中引入了插件提供的大量的less文件,如下面所示3.如果我们不需要less的样式,可运行
rails generate bootstrap:install static此时生成的是assets/stylesheet/sbootstrap_and_overrides.css.scss,因为rails框架中默认安装了gem 'sass-rails'插件,所以scss文件可被解析为css文件4.如果我们要使用该插件提供的布局,可运行
rails g bootstrap:layout application fixed生成固定布局,运行
rails g bootstrap:layout application fluid生成流式布局,或者运行
rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]生成流式或固定布局,可根据自己需要选择。5.如果要使用插件提供的js,在application.js中引入//= require twitter/bootstrap即可6.完成以上的步骤,便可以在自己的程序中引用插件提供的css和js文件了
相关文章推荐
- intall twitter-bootstrap-rails
- ruby on rails 如何使用gem "twitter-bootstrap-rails"
- Rails 3.2 and Twitter Bootstrap 2
- Centering text in a table in Twitter Bootstrap
- 「2012-12-15」twitter 年度专题,Bootstrap,Less,NASA code
- 向Web开发人员推荐12款优秀的 Twitter Bootstrap 组件和工具
- http://twitter.github.io/bootstrap/
- Responsive Design with Twitter Bootstrap
- 基于拖放布局的 Twitter Bootstrap 网站生成器
- twitter bootstrap+jquery ajax+Google OAuth2.0实现网站实例
- 12款优秀的 Twitter Bootstrap 组件和工具
- bootstrap-datetimepicker:基于twitter bootstrap的日期/时间选择控件
- ASP.NET: Display GridView Row Details in Modal Popup using Twitter Bootstrap
- bootstrap 与 rails 2.3.8整合之:will_paginate插件的使用
- Twitter Bootstrap 框架
- Ruby——在Rails上使用Bootstrap
- Twitter Bootstrap3小结
- CSS——Bootstrap From Twitter
- Windows环境下Rails安装Bootstrap失败解决方法
- 使用Twitter Bootstrap的五大理由