【发布时间】:2012-12-23 17:13:43
【问题描述】:
我想添加一个 Twitter 引导 glyphicon 来替换下面 CSS 文件中的图像引用,但不确定如何。
.edit-button {
background: url('../img/edit.png') no-repeat;
width: 16px;
height: 16px;
}
在 HTML 中我会添加如下:
<i class="icon-search icon-white"></i>
有什么想法吗?
更新 - 尽管它只在 Firefox 的萤火虫中显示宽度和高度,但尝试了以下操作:
.edit-button
{
/* background: url('../img/edit.png') no-repeat; */
background: url(../img/glyphicons-halflings.png) no repeat -96px -72px !important;
width: 16px;
height: 16px;
}
不知道为什么没有收到?
【问题讨论】:
-
它适用于我的机器。确保路径正确
标签: css image twitter-bootstrap glyphicons