2012-02-06 56 views
1

RGBA - 解決方法是IE「DXImageTransform.Microsoft.gradient」;實測值由www.css3please.com跨瀏覽器透明度提供一個方便的工具,但應用這種梯度在IE瀏覽器(IE8) - 的作品,但文本失去其清晰度/清晰度文本呈現在IE螺合「梯度」

應用georgia使所有瀏覽器的字體看起來均勻,但在我申請的梯度中的文本不正確顯示這裏的的jsfiddle http://jsfiddle.net/mvivekc/GJaDy

代碼是 -

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<meta http-equiv="X-UA-Compatible" content="IE=9" /> 
<html> 
<style type="text/css"> 
.georgiaWithTransform{ 
    font-family: Georgia; 
    height: 80px; 
    width: 800px; 
    font-family: "Georgia", Geneva ; 
    word-wrap:break-word; 
     background-color: rgba(150, 150, 150, 0.3); /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */ 
       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C969696,endColorstr=#4C969696); /* IE6–IE9 */ 
       zoom: 1; 

} 
.georgiaWithoutTransform{ 
    font-family: Georgia; 
    margin-top: 30px; 
    height: 80px; 
    width: 800px; 
    font-family: "Georgia", Geneva ; 
word-wrap:break-word; 
    background-color: rgba(150, 150, 150, 0.3); /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */ 

} 
</style> 
<body> 
<div class="georgiaWithTransform">Georgia does not appear properly with transformation in IE 8,and i do not understand why this is happening</div> 
<div class="georgiaWithoutTransform">Georgia properly without transformation in IE 8,You can notice the difference in the appearance of the text here as compared to the top part(Noticeable only in IE)</div> 
</body> 
</html> 

不明白爲什麼會發生這種情況,並且非常需要解決此問題的解決方法。

下面是關於IE8的問題的屏幕截圖 - enter image description here

同樣的情況,在小提琴以及..問題只會出現在IE瀏覽器,不知道爲什麼..

請幫幫忙, 在此先感謝

+0

只是想補充,在FF/Chrome/safari上沒有看到這個問題..只有在ie .. – 2012-02-06 07:12:26

+0

您可能想要添加正確的示例。 (http://jsfiddle.net) – Joonas 2012-02-06 09:05:10

+0

@lollero已經更新了代碼,以便爲您和其他人更好地查看我的問題,請在IE中檢查小提琴以查看我的問題(應用漸變的文本渲染) - 檢查小提琴在這裏.. http://jsfiddle.net/mvivekc/GJaDy/ ..任何幫助表示讚賞.. – 2012-02-06 09:43:35

回答

0

我有一個與IE中的不透明度過濾器相似的問題,建議我的替代方案是使用2x2圖像和背景重複。在你的情況下,你可以用1px的寬度和內容高度作爲你的圖像的高度,並應用所需的漸變。這可能對你沒有多大幫助,但是,這裏是上述問題的鏈接。

P.S:使用圖像作爲解決方法確實對我來說就像是一種魅力。

IE Filter Antialiasing problem

+0

謝謝,我會保持這種最後的手段..似乎使用圖像是每個愚蠢的IE問題的唯一解決方法.. – 2012-02-06 10:45:37

+0

是的,我經歷了相同的。如果您找到解決方法,請更新! – 2012-02-06 10:51:00

0

好吧,這就是我的想法發生了什麼。過濾器關閉字體中的消除鋸齒。 You can see a solution offered here. Biziclop創建了一個可以使用的小型jQuery腳本和has a sample of it working here。這將迫使瀏覽器僞造消除鋸齒。

+0

檢查答案,使用普通的JS ..有沒有辦法我可以用普通的JS包裝它? – 2012-02-07 14:15:45

+0

另外,他提到它的v內存飢餓的方法 - 你會建議使用它嗎?或者,有沒有其他方式來實現相同? – 2012-02-07 14:17:39

+0

說實話,我不打擾試圖在IE上支持rgba。我只是確保它會優雅地退化並繼續前進。我設法讓客戶和同事瞭解,在每個瀏覽器中,頁面不必相同。我見過的唯一的其他解決方案就是Brutallus提到的那個。對不起,我不能有更多的幫助。 – 2012-02-07 15:02:14