2015-12-18 143 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>