我有IE8的问题我无法生成< a>元素透明.我发现了这些相关的SO问题,但我没有运气,因为那里提供的答案:
> Opacity CSS not working in IE8
> Opacity in web pages?
我已经尝试过“giving layout”,使用zoom:1;,但它没有帮助.这是我的测试CSS,取自this page的示例:
.test { background-color: #6374AB; width: 100%; color: #ffffff; zoom: 1; } .opaque1 { opacity: .5; } .opaque2 { filter: alpha(opacity=50); } .opaque3 { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; } .opaque4 { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); }
并测试HTML:
<p class="test">Test paragraph without opacity.</p> <p class="test opaque1">Test paragraph with <code>opacity</code></p> <p class="test opaque2">Test paragraph with <code>filter</code></p> <p class="test opaque3">Test paragraph with <code>-ms-filter</code></p> <p class="test opaque4">Test paragraph with compatibility note</p> <p> <a class="test" href="#">Test anchor without opacity.</a><br/> <a class="test opaque1" href="#">Test anchor with <code>opacity</code></a><br/> <a class="test opaque2" href="#">Test anchor with <code>filter</code></a><br/> <a class="test opaque3" href="#">Test anchor with <code>-ms-filter</code></a><br/> <a class="test opaque4" href="#">Test anchor with compatibility note</a><br/> </p>
在IE8中,opaque2,opaque3和opaque4段落是透明的,但没有任何锚点.在IE6中,opaque2和opaque4段落以及锚点都具有透明度.