我和问题How to add custom icon in Twitter Bootstrap有同样的问题
How to add custom icon in Twitter Bootstrap 的解决方案从上面问题的答案看起来不错。我唯一想问的是如何在左边的图标和右边的 30px 图标之间设置 20px。我使用的图标不是标准的 14x14 pxpx,所以我再次使用了 enter link description here .
谢谢。
最佳答案
只需将填充添加到您创建的自定义类中,如下所示:
CSS
.icon-car {
background-image: url("http://cdn5.iconfinder.com/data/icons/Symbolicons_Transportation/24/Car.png");
background-position: center center;
height: 24px;
line-height: 24px;
width: 24px;
padding-left:20px;
padding-right:30px;
}
关于html - 使用 Twitter Bootstrap 修复自定义图标的填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11781643/