2011-09-17 20 views
10

看看這IE9:最先進的CSS渲染錯誤(IE9)

http://jsfiddle.net/dalgard/n6PDB/show/

屏幕轉儲: enter image description here

閱讀這些評論:

/* 
* IE9: Upon moving the mouse a ghostly 1px vertical line appears 53px into the 
* blue area - only works with normalized CSS (!?) and not inside an iframe 
*/ 

#test { 
    width: 152px;    /* must be 152px or larger! */ 
    height: 200px;   /* can be any height */ 
    border-radius: 1px;  /* must be 1px or larger */ 
    background-color: #44f; /* ghost-line becomes invisible with #00f */ 
} 

#test:hover {}    /* removing this makes the line disappear */ 

#test div { 
    opacity: 0;    /* removing this makes the line disappear */ 
    position: relative;  /* removing this makes the line disappear */ 
    left: 53px;    /* must be 53px or smaller! */ 
    width: 10px;    /* must be 1px or larger */ 
    height: 150px;   /* height of the ghost-line */ 
} 

有沒有人對此有任何意見?發生了什麼,我該如何報告?我如何避免這種情況發生(我知道,似乎我可以只是改變上述任何屬性,但它並不那麼容易......)?

+0

或者您可以使用http:/ /jsfiddle.net/dalgard/n6PDB/show/ –

+0

噢,如果我切換到另一個選項卡,然後改回來,該行就會消失。不過,它在移動鼠標後重新出現。 – dalgard

+0

(感謝「顯示」功能 - 太棒了) – dalgard

回答

1

該行必須處理父容器和內部div的邊界。如果你擺脫內部div或邊界它解決了問題。我不知道這是否會有所幫助,但這似乎是問題所在。

+0

您是否注意到如何更改任何值,包括將整個事物放入iframe中,使線條消失?是什麼讓你得出你的結論? – dalgard

+0

我會把它稱爲IE中的渲染錯誤,但我注意到如果我禁用IE webdev工具中渲染問題消失的左邊框值。我還注意到渲染問題似乎在內部div坐在塊的左邊緣觸發,並且在鼠標懸停(不應該執行任何操作)時出現渲染線。所以我會首先遇到邊界問題,因爲如果改變的話,這是最不可能被發現的。 – CBRRacer