简体   繁体   English

Glyphicons 显示为正方形(引导程序 3.2.0)

[英]Glyphicons showing up as squares (bootstrap 3.2.0)

I am trying to load search glyphicon with the following:我正在尝试使用以下内容加载搜索字形:

 <div tabindex="6" class="glyphicon glyphicon-search">...<.div>

But, glyphicon loading as the following:但是,字形加载如下:

在此处输入图片说明

What is the solution?解决办法是什么?

 background-color:none transparent}@font-face{font-family:'Glyphicons Halflings';src:url(/css/fonts/glyphicons-halflings-regular.eot);src:url(/css/fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(/css/fonts/glyphicons-halflings-regular.woff) format('woff'),url(/css/fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(/css/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular)

Here is Bootstrap3.2.0 downloaded from Bootstrap site这里是Bootstrap3.2.0从下载的引导网站

Unpack and run below code解压并运行下面的代码

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="bootstrap3.2.0/css/bootstrap.min.css">
</head>
<body>
    <div tabindex="6">
        <span class="glyphicon glyphicon-search"></span>
    <div>
</body>
</html> 

Worked as like as BS3.5像 BS3.5 一样工作

Check this code检查此代码

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
    <div tabindex="6">
        <span class="glyphicon glyphicon-search"></span>
    <div>
</body>
</html> 

Though a late answer, for someone who has this issue:虽然回答晚了,但对于有这个问题的人来说:

Using Bootstrap's CDN in the tag solved this issue for me.在标签中使用 Bootstrap 的 CDN 为我解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM