How can I use Bootstrap 3.0 CDN to include the updated Glyphicons?

Linda Hamilton
Release: 2024-11-04 17:56:02
Original
294 people have browsed it

How can I use Bootstrap 3.0 CDN to include the updated Glyphicons?

Bootstrap 3.0 CDN Includes Updated Glyphicons

The Bootstrap Glyphicons icon font has recently been re-integrated into the main Bootstrap repository, making it easier to incorporate into projects. Bootstrap CDN now serves the complete Bootstrap 3.0 CSS, including Glyphicons.

Including Bootstrap CSS for Glyphicons:

To use Glyphicons, simply include the Bootstrap CSS reference in your HTML or CSS:

HTML:

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

CSS:

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

Note: You must use .glyphicon classes instead of .icon for Glyphicons.

Independent Glyphicons Reference:

If you prefer to use Glyphicons separately from Bootstrap, you can directly include the Glyphicons CSS file from Bootstrap CDN:

HTML:

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

CSS:

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

This includes all necessary dependencies, allowing for standalone use of Glyphicons.

Additional Notes:

  • Bootstrap.min.js is still required for JavaScript components.
  • .icon classes have been replaced with .glyphicon classes.
  • The Glyphicons font has been updated with 40 new icons.

The above is the detailed content of How can I use Bootstrap 3.0 CDN to include the updated Glyphicons?. 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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template