截至目前,我的按钮使用图标字体。我想删除图标字体,改用图像。
我的代码是这样的
.zocial::before {
content: "";
/* some code goes here */
}
.zocial.plus::before {
content: "p";
}
我创建了一个 jsfiddle 来向您展示演示。 Click here to view it
如您所见,该按钮现在同时具有图标字体(即 p)和搜索图标。
现在我想删除那个“p”字符并将搜索图标移到那里。
非常感谢您的帮助。
谢谢
最佳答案
试一试。
.zocial.plus::before {
content: "\0000a0";
background: url("http://twitter.github.com/bootstrap/assets/img/glyphicons-halflings-white.png") -48px 8px no-repeat;
}
这是 fiddle : http://jsfiddle.net/VJsHb/
关于html - css - 背景图像而不是图标字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14467733/