【发布时间】:2014-12-12 15:26:31
【问题描述】:
这个问题之前已经提出过,但解决方案目前在 Windows(7 Pro 64bit SP1)中的 Firefox(34.0.5)中失败。我想在 GE 插件上绘制一个 iframe。以下代码适用于
Chrome 和 Safari,以及 Firefox OSX:
但不是 Firefox for Windows:
其他 Windows 用户是否得到相同的结果?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<title>HTML overlay</title>
<script src="http://www.google.com/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawTo7L1FE1-amhuQxIlXw"></script>
<script>
google.load("earth", "1");
var ge = null;
function init() {
google.earth.createInstance("map3d", initCallback, failureCallback);
}
function initCallback(object) {
ge = object;
ge.getWindow().setVisibility(true);
}
function failureCallback(object) {
}
</script>
</head>
<body onload='init()' id='body'>
<center>
<div>
header bar
<br>
ignore this
</div>
<div id='map3d' style='height:98vh; width: 100%; position: relative; z-index: 50'></div>
<iframe src="" srcdoc="<p style='color: red;'>Let's put some HTML on top</p><br><p style='color: red;'>And some more here</p>" style='width: 200px; height: 100px; top: 0; left: 0; position: absolute; z-index: 100'></iframe>
</center>
</body>
</html>
【问题讨论】:
标签: css firefox iframe google-earth-plugin