【发布时间】:2015-07-14 17:24:04
【问题描述】:
请记住,我对 HTML 和 CSS 相当陌生。我网站上的引导标头中有一个徽标 (www.prettyugly.co.nz)
我最初使用下面的代码来显示它,它在 Chrome 中运行良好
.image {
content: url("/img/logo-white.png");
}
然后这个在 HTML 中调用那个 CSS
<div class="image"></div>
我后来了解到您必须使用 :before 命令才能让内容在 Firefox 中运行,但我无法让它全面运行。
有什么想法吗?
【问题讨论】:
-
将
content替换为background或background-image。 -
您是否还必须为此指定一个尺寸,还是仅以图像尺寸的 100% 显示?
-
感谢您的评论,但它仍然没有显示图像。
background: url("/img/logo-white.png");和background-image: url("/img/logo-white.png");都不起作用。
标签: javascript html css twitter-bootstrap firefox