简体   繁体   中英

Rails Font Awesome Icons

I've read a few of the pages on using font awesome with rails and that the Gemfile should include
gem 'font-awesome-rails' then run bundle install and the application.css should include *= require font-awesome however, when I try to use the icons such as <i class="icon_home"></i> to get the home icon, it shows up as blank, the grey icon should be the home icon picture

I have also tried to edit the font-awesome.css file and change the @font face and edit the applications.rb to include the fonts folder as recommended in other pages but I get the same issue

Use this.

<i class="fa fa-home" aria-hidden="true"></i>

If you ever want any icon just go Here and click on icon you want and it will give your HTML for that icon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM