Adding extra glyphicons to bootstrap

2020-07-06 08:12发布

问题:

Dear fellow designers/developers

I have created 8 extra glyphicons for my bootstrap website. Uploaded them to icomoon and downloaded them as font, this all works perfect.

I am able to add my font to my CSS and use it in HTML withou any problem, but I want to use the font as extra Glyphicons.

How can I do this?

回答1:

refer to this website which provides the font icons to bootstrap

Font-Awesome

download fontawesome here fontawesome.io

add css file link to your page

 <link href='/path/to/font-awesome.css' rel='stylesheet'/>

use css classes mentioned in font-awesome.css stating with 'fa-'

example: <i class="fa fa-desktop"></i>

please copy css and fonts folders to same folder



回答2:

Steps to use font-Awsome

  1. Download Font-Awsome
  2. Extract .zip file
  3. after extracting, you will get folder i.e. font-awesome-4.5.0
  4. Add this folder by drag and drop to your content or bootstrap folder
  5. Add font-awesome.css file as a reference in your web-page

    <link href="~/Content/font-awesome-4.5.0/css/font-awesome.css" rel="stylesheet" />
    
  6. get icons as told by @G Ravinder i.e.

    <i class="fa fa-desktop"></i>
    <span class="fa fa-desktop"></span>
    

That's all :-)