在Rails 3.1中加载print.css

时间:2011-09-18 17:15:56

标签: ruby-on-rails-3.1

如何在Rails 3.1中加载print.css文件?

2 个答案:

答案 0 :(得分:3)

不确定是否需要适用于打印介质的打印css

以下内容应达到目的 - stylesheet_link_tag“print”,:media => “打印”

答案 1 :(得分:1)

实际上,如果您查看application.css文档,您会看到:

/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree . 
*/

这意味着将包含application.css(require_self)以及stylesheets文件夹中的其他CSS(require_tree。)。

我是Rails的初学者,所以我无法进一步解释! 搜索有关require_self,require_tree和SASS语言的任何信息。