2012-01-01 75 views
0

与Firefox相比,Chrome中只有一种CSS属性可以不同吗?绝对定位在Chrome中无法正确显示

某个元素具有绝对定位,并在Firefox中正确显示,但在Chrome中显示为低2个像素。

+1

我们至少需要看一些代码才能帮到你 – Duopixel 2012-01-01 19:58:02

回答

1

仅定位到Firefox的使用:

<style type="text/css"> 
@-moz-document url-prefix() { 
    h1 { 
     color: red; 
    } 
} 
</style> 

<h1>This should be red in FF</h1> 

我得到了这个答案从另一个堆栈溢出问题: Targeting only Firefox with CSS

您可以通过在两种浏览器中打开以下的jsfiddle测试:jsFiddle

+0

我会试试它并回报...谢谢! – rlesko 2012-01-03 15:39:27