Html 字体不加载?
我有一个rails应用程序,为了管理我的资产,我正在使用bower。如果可能的话,我不喜欢在JS和CSS等资产上使用gems 在我的Html 字体不加载?,html,css,ruby-on-rails,fonts,font-awesome,Html,Css,Ruby On Rails,Fonts,Font Awesome,我有一个rails应用程序,为了管理我的资产,我正在使用bower。如果可能的话,我不喜欢在JS和CSS等资产上使用gems 在我的vender/assets/stylesheets目录中,我有以下内容:font-awesome中有scss和font 在我的railsapp/assets/stylesheets/application.scss中,我有以下内容: /* * This is a manifest file that'll be compiled into application.
vender/assets/stylesheets
目录中,我有以下内容:font-awesome
中有scss
和font
在我的railsapp/assets/stylesheets/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 vendor/assets/stylesheets of plugins, if any, 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 top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*= require style.scss
*= require chosen/chosen.min
*= require jquery.ui.all
*= require selectize.js/css/selectize.css
*= require selectize.js/css/selectize.bootstrap3.css
*= require font-awesome/scss/font-awesome
*/
页面加载良好。但是当我这样做时:我遇到了类似的问题,并通过使用以下css文件修复了它:
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
我想不起哪里出了问题,希望这能有所帮助。我遇到过类似的问题,并通过使用以下css文件修复了它:
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
我想不起哪里出了问题,希望这能有所帮助。请注意,这里的实际错误是您没有分配“fa”类
而不是:
<i class="fa-question"></i>
你需要:
<i class="fa fa-question"></i>
对于记录,这里的实际错误是您没有分配“fa”类
而不是:
<i class="fa-question"></i>
你需要:
<i class="fa fa-question"></i>
请将缺少的引号添加到类的末尾。请将缺少的引号添加到类的末尾。