【发布时间】:2011-02-17 19:27:06
【问题描述】:
似乎 IE8 无法正确呈现本地文件:
考虑这个简单的网页:http://sayang.free.fr/ie8render.html(下面的 html 代码)摘自 w3c 不透明度教程。
本地保存,再次显示:本地文件没有透明度!
这很烦人,尤其是当一个人想要在放置在本地文件中的原型上设计复杂的页面时。
你有解决办法吗?
<html>
<head>
<title>IE8 Local File</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<style type="text/css">
div.background
{
width: 500px;
height: 250px;
background: url(http://www.w3schools.com/css/klematis.jpg) repeat;
border: 2px solid black;
}
div.transbox
{
width: 400px;
height: 180px;
margin: 30px 50px;
background-color: #ffffff;
border: 1px solid black;
/* for IE */
filter:alpha(opacity=60);
/* CSS3 standard */
opacity:0.6;
}
div.transbox p
{
margin: 30px 40px;
font-weight: bold;
color: #000000;
}
</style>
</head>
<body>
<h2>Save this file locally and open it to see the difference</h2>
<div class="background">
<div class="transbox">
<p>This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box.</p>
</div>
</div>
</body>
</html>
【问题讨论】:
标签: file internet-explorer rendering opacity