css - 为什么我的 glyphicon 铅笔很胖

标签 css ruby-on-rails twitter-bootstrap glyphicons

<h1 class="h1name" style="" ><bold><%= @user %></bold><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></h1>

Fat glyphicon

Desired Glyphicon

我不知道为什么我得到的是粗的 glyphicon-pencil,而不是 Bootstrap Components 网站上看到的正确铅笔。 http://getbootstrap.com/components/#glyphicons-how-to-use

 gem 'twitter-bootstrap-rails'

是我在 ruby​​ on rails 元素上使用的 Bootstrap 版本吗

我正在使用 roboto 字体

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

另一个带有信封字形的示例

fat envelope

correct envelope

没有 roboto 字体它看起来像这样(仍然与所需的有很大不同) enter image description here

最佳答案

我遇到了同样的问题,我尝试用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>

关于css - 为什么我的 glyphicon 铅笔很胖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34348993/

相关文章:

html - 带有选择和清除图标的 Bootstrap 搜索框

php - 将框架重定向到 https?

ruby-on-rails - capybara + Webkit : How to test client side validations - "required" input elements?

ruby-on-rails - Rails 3 沙盒控制台

javascript - 导航栏切换按钮不起作用

javascript - 必须等到服务加载后才能执行 jQuery

asp.net - 将超链接应用于图像

css - 尝试向现有菜单添加 CSS 子菜单

javascript - 交互式 CSS 图像映射

ruby-on-rails - 从 authlogic 中删除用户名验证