2015-12-18 108 views
1
<h1 class="h1name" style="" ><bold><%= @user %></bold><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></h1> 

Fat glyphicon为什么我glyphicon铅笔脂肪

Desired Glyphicon

我不知道为什么我越来越胖glyphicon铅笔,而不是在引导组件网站看到正确的作为。 http://getbootstrap.com/components/#glyphicons-how-to-use

gem 'twitter-bootstrap-rails' 

是自举版本我用我的Ruby on Rails项目

我使用的Roboto字体为

<link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'> 

与信封另一个样品glyphicon

fat envelope

correct envelope

没有的Roboto字体,它看起来像这样(仍然希望的一个非常不同的) enter image description here

+0

尝试使用另一个图标,而不是铅笔,看看你是否面临同样的问题? – noobcode

+0

检查图标字体是否被正确引用? –

+0

尝试为字体图标明确指定字体大小。即.glyphicon-pencil {font-size:10px; }只是一个建议。 –

回答

1

我面临同样的问题,我试着用CDN路径替换本地文件。它的工作原理。

<!-- Latest compiled and minified CSS --> 
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 

<!-- Optional: Include the jQuery library --> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
<!-- Optional: Incorporate the Bootstrap JavaScript plugins --> 
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>