この記事は賞味期限切れです。(更新から1年が経過しています) 透過PNGの処理が下手くそなのは、IE6だけではなく、IE7/8も同様です。 IEで透過PNGをあてた要素のopacityを弄ると、周りがグレーがかって汚くなります。 この現象はよく知られていると思いますが、今日はこの不具合の治し方のメモを記しておきます。 サンプルコード 例えば、こんなコード。 <style> .test { display:block; width:128px; height:128px; background:url(./test.png) 0 0 no-repeat transparent; } .test:hover { background-image:url(./test-hover.png); } </style> <a href="#" class="test"></a> test.pngとte
![IEの透過PNG+opacityの不具合を治すメモ - Mach3.laBlog](https://cdn-ak-scissors.b.st-hatena.com/image/square/7aa1bc566cd6892a2490c10a27fba19e2306b9fc/height=288;version=1;width=512/https%3A%2F%2Flh4.googleusercontent.com%2F_JJkNs5Ixl70%2FTVu-3xR1lSI%2FAAAAAAAABMM%2FDOQpFbompG8%2F201102162110.png)