"> How to use bootstrap font icon-Bootstrap Tutorial-php.cn

How to use bootstrap font icon

angryTom
Release: 2019-07-27 11:41:43
Original
4869 people have browsed it

How to use bootstrap font icon

If you want to know more about Bootstrap, you can click:Bootstrap Tutorial

This article will explain font icons (Glyphicons) and understand its use through some examples. Bootstrap comes bundled with glyphs in over 200 font formats. First, let us first understand what a font icon is.

What is a font icon

Font icon is an icon font used in web projects. Although, Glyphicons Halflings require a commercial license, you can use these icons for free through the 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

The font icon 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

Relevant CSS rules are written in the bootstrap.css and bootstrap-min.css files in the css folder in the dist folder.

Usage

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

Copy after login

The following example demonstrates how to use font icons:

Copy after login

The result looks like this:

How to use bootstrap font icon

Navigation with font icons Column

Copy after login

Customize font icons

We have seen how to use font icons, next let’s look at how to customize font icons .

We will start with the above example and customize the icon by changing the font size, color and applying text shadow.

The following is the starting code:

Copy after login

The effect is as follows:

How to use bootstrap font icon

Customized font size

You can make an icon appear larger or smaller by increasing or decreasing its font size

Copy after login

How to use bootstrap font icon

Customize font color

Copy after login

How to use bootstrap font icon

Apply text shadow

Copy after login

How to use bootstrap font icon

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!