如何在3.0.0中使用Bootstrap Glyphicons? [英] How do I use Bootstrap Glyphicons in 3.0.0?

查看:64
本文介绍了如何在3.0.0中使用Bootstrap Glyphicons?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Bootstrap中使用Glyphicons.我是直接从 http://glyphicons.getbootstrap.com/css/bootstrap-glyphicons.css <调用CSS的/a>,但是现在它消失了,不建议这样做.

I'm using Glyphicons in Bootstrap. I was calling in the CSS straight from http://glyphicons.getbootstrap.com/css/bootstrap-glyphicons.css but this has now disappeared and was not recommended.

这显然与Twitter使Glyphicons再次出现在Bootstrap软件包中相吻合.我正在使用Bootstrap 3.0.0 RC1或RC2.

This apparently coincides with Twitter making the Glyphicons available in the Bootstrap package again. I am using Bootstrap 3.0.0 RC1 or RC2.

我的问题:我不知道如何在自己的主机中使用图标... 在我看来,该代码包含在bootstrap.css(?)中. 我已经上传了字体"目录,但只得到空白的空白框图标,应该有适当的图标.

My problem: I have no idea how to use the icons in my own hosting... Seems to me the code is contained within the bootstrap.css (?). I have uploaded the "fonts" directory but am only getting blank, empty-box icons where there should be proper icons.

有什么想法吗?应该在哪里,应该怎么称呼它?

Any ideas please? What should be where and how should it be called?

推荐答案

bootstrap-glyphicons.css文件似乎已在最终\正式版Bootstrap 3.0.0中删除.只需从 http://getbootstrap.com/下载zip,然后将dist/css/bootstrap.min.css文件复制到您的css文件夹中.然后,应将其包含在HTML页面中,如下所示:

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>

来源: http://getbootstrap.com/getting-started/

这篇关于如何在3.0.0中使用Bootstrap Glyphicons?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆