How to include Glyphicons in your Bootstrap 3 project using a CDN?

DDD
Release: 2024-11-03 20:57:29
Original
228 people have browsed it

How to include Glyphicons in your Bootstrap 3 project using a CDN?

Bootstrap 3 Glyphicons CDN

With the addition of Glyphicons back into the Bootstrap 3 repository, accessing them through a CDN is now easier than ever before.

Using Bootstrap CDN with Glyphicons

The updated Bootstrap CSS file now includes Glyphicons and its dependencies. To include them in your project, you can simply reference Bootstrap's CDN:

In HTML:

<code class="html"><link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"></code>
Copy after login

In CSS:

<code class="css">@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css");</code>
Copy after login

Remember to use ".glyphicon" classes instead of ".icon" for Glyphicon elements.

Using Glyphicons Separately

If you want to use Glyphicons without the rest of Bootstrap, you can directly reference the Glyphicons CSS file on Bootstrap CDN:

In HTML:

<code class="html"><link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet"></code>
Copy after login

In CSS:

<code class="css">@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css");</code>
Copy after login

Note that this approach only includes the Glyphicons CSS and does not load Bootstrap's JavaScript or other dependencies.

The above is the detailed content of How to include Glyphicons in your Bootstrap 3 project using a CDN?. For more information, please follow other related articles on the PHP Chinese website!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template