How do I use Bootstrap Glyphicons in 3.0.0?

我的未来我决定 提交于 2019-12-04 22:42:18

The bootstrap-glyphicons.css file seems to have been removed with the final\production Bootstrap 3.0.0. Simply download the zip from http://getbootstrap.com/ and then copy the dist/css/bootstrap.min.css file in your css folder. You should then include it in your HTML page as such:

<!DOCTYPE html>
<html>
  <head>
    <title>Bootstrap 101 Glyphicons</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Bootstrap CSS file -->
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

  </head>
  <body>

    <!-- Glyphicon in a H1 tag -->
    <h1>Hello, <span class="glyphicon glyphicon-globe"></span> !</h1>

  </body>
</html>

Source: http://getbootstrap.com/getting-started/

If you have already put in the fonts directory, calling the icons now would be <span class="glyphicon glyphicon-pencil"></span> instead of <i class="icon-large icon-pencil"></i>.

Just make sure your fonts folder is placed correctly relative to the .css file: ../fonts

some-root-folder
├--my-css-folder
|  └--bootstrap.min.css
└--fonts
   └--glyphicons-halflings-regular.ttf

I followed this post http://www.erikminkel.com/2013/09/01/twitter-bootstrap-3-in-a-rails-4-application. I don't know if the best way, but Works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!