Please leave appropriate space between the icon and text."/> Please leave appropriate space between the icon and text.">

Home  >  Article  >  Web Front-end  >  How to use bootstrap font icon

How to use bootstrap font icon

(*-*)浩
(*-*)浩Original
2019-07-11 13:31:563374browse

Bootstrap bundles glyphs in over 200 font formats. First, let us first understand what a font icon is.

How to use bootstrap font icon

#What is a font icon? (Recommended learning: Bootstrap video tutorial)

Font icon is an icon font used in Web projects. Although, Glyphicons Halflings requires a commercial license, you can use these icons for free through project-based Bootstrap.

In order to express our gratitude to the icon author, we hope that you will include a link to the GLYPHICONS website when using it.

Get the font icon

We have downloaded the Bootstrap 3.x version in the Environment Installation chapter and understood its directory structure. Font icons can be found in the fonts folder, which contains the following files:

glyphicons-halflings-regular.eot

glyphicons-halflings-regular.svg

glyphicons -halflings-regular.ttf

glyphicons-halflings-regular.woff

The relevant CSS rules are written in bootstrap.css and bootstrap-min.css in the css folder in the dist folder on the file.

There are 200 classes, each class is for an icon. The common format of these classes is as follows:

.glyphicon-keyword:before {
  content: "hexvalue";
 }

To use icons, simply use the following code. Please leave appropriate space between the icon and text.

<span class="glyphicon glyphicon-search"></span>

For more technical articles related to Bootstrap, please visit the Bootstrap Tutorial column to learn!

The above is the detailed content of How to use bootstrap font icon. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is bootstrap pluginNext article:What is bootstrap plugin