【发布时间】:2011-09-06 03:17:38
【问题描述】:
我的 html 网页中嵌入了一个大型 SVG 文件(1100x44000 像素)。我的代码在 Firefox 4 上运行起来就像一个魅力,但在带有 Adobe 插件的 IE8 上无法正确显示。
更准确地说,当我将我的 SVG 嵌入到 EMBED(或 IFRAME)标签中时,对于属性 height
我知道 IE8 与 SVG 存在兼容性问题。我在 IE 上尝试了“兼容性视图”并尝试添加,但没有帮助。
任何帮助表示赞赏:)
这里是代码的摘录:
<table style="width:1100px;">
<tr>
<td colspan="2">
<div class="title" >data</div>
</td>
</tr>
<tr>
<td colspan="2">
<div id="DivCont" class="SVG_container">
<embed src="./NC_012587/out.svg" style="margin-top:30px; overflow:hidden;" width="1100" height="44000" />
</div>
</td>
</tr>
一些 CSS:
tr{
width:1100px;
}
td{
border:1px solid #dfdfdf;
}
td.box{
background-color: #f5eded;
margin-top: 0px;
top: 0px;
height: 200px;
}
div.SVG_container{
height:600px;
width:1100px;
overflow:scroll;
position:relative;
}
rect.select_div{
position: absolute;
height: 30px;
width: 98px;
background: #CCF;
border: 1px solid #AAD;
text-align: center;
font-size: 10px;
border:1px solid black;
/* for IE */
filter:alpha(opacity=60);
/* CSS3 standard */
opacity:0.6;
}
【问题讨论】:
-
既然您已经知道 IE8 根本不支持 SVG(我已经在上一个问题中告诉过您),您应该指定您使用什么产品来添加 SVG 支持。问题可能出在那个产品上,而不是 IE8。
-
它如何与 Chrome 一起使用?除了使用 Adobe 插件,也许您可以建议人们使用 Google Chrome Frame。
标签: html internet-explorer iframe svg embed