【发布时间】:2014-06-25 20:07:59
【问题描述】:
我有以下css:
#logo{
content: url(../images/logo.svg) 0 0 no-repeat;
background-color: black;
margin-top: 30px;
height: 20px;
width: 100px;
}
#logo-container{
background-color: black;
margin-top: 0px;
height: 65px;
width: 100px;
}
使用该 html:
<div class="col-md-1 col-md-offset-1 col-xs-3 ">
<div id="logo-container"><a id="logo" href="#firstpage" data-target="start" title="EPIC Companies"></a></div>
</div>
Chrome 正确显示徽标,而 Firefox 显示黑色矩形(仅容器)。我做错了什么?
【问题讨论】:
-
使用 :after 在#logo 中创建一个伪元素。
标签: html css google-chrome firefox