为什么我不能在Chrome中显示此范围但我可以在FF中显示?

时间:2013-09-17 08:33:04

标签: html css google-chrome firefox

我有以下CSS:

.views-imagematrix-block .views-field-title .field-content > a .promotedstar {
    position: relative;
    top: -6px;
}
.promotedstar {
    background: url("../img/icons/Star.png") no-repeat scroll 0 0 transparent;
    font-weight: bold;
    height: 25px;
    padding-bottom: 10px;
    padding-right: 25px;
    position: relative;
    top: 0;
    width: 25px;
}

以下html:

<div class="views-field views-field-title">
    <span class="field-content"><a href="/content/gershwins-coffee-house"><span class="promotedstar"></span>&nbsp;Gershwins Coffee House</a></span>
</div>

这在Firefox中提供了完全所需的效果,但是在Chrome中...它显示跨度在div之外(向左),并且甚至不显示溢出:可见;设置为包含div。 (跨度似乎没有采取填充)。我不知道如何解决这个问题......

1 个答案:

答案 0 :(得分:1)

它看起来像Chrome漏洞。 我认为它与SPAN是空的这一事实有关,我在chrome issue tracker中发现了一些相关的错误