1

我正在尝试实现 iframe shim 以在 google earth 插件之上呈现自定义 html 内容。我成功地渲染了叠加层,但是我也想让 iframe 和自定义 html 都是半透明的。将“allowTransparency”设置为 true 并降低 iframe 的不透明度时,不会呈现自定义 html 内容。

下面是示例代码

<body>

   <div id="earth"></div>

   <iframe allowTransparency="true" style="position:absolute; top:0px; bottom:0px; right:0px; width:200px; height:500px; background:#222; opacity:0.5; border:none; z-index:100;"></iframe>

   <div id="shimdiv" style="position:absolute; top:0px; bottom:0px; right:0px; width:200px; height:500px; background:#222; opacity:0.5; border:none; z-index:100;"></div>

</body>

我发现的所有示例都呈现完全不透明的 html 内容。有谁知道允许透明度的解决方法?

提前致谢。

4

0 回答 0