2
我一直在大量研究这个问题。我有一个我正在开发的项目,它基本上代表了不同位置的游览,每个位置都是在Google Earth网络播放器中动态生成的。问题在于客户要求代表某个位置的每个地标的内容更加时尚。当然,我很快发现Google Earth会恶意清理您放入KMZ文件的所有CSS,这非常烦人。许多在线讨论都提到将!important关键字放在CSS声明中,或者以一些有趣的方式使用气球样式来防止这一点。到目前为止,我还没有找到具体的解决方案。如何避免Google Earth气球中的CSS清理问题
我只是想知道是否存在黑客或Google地球的方法不能简单地删除所有的CSS。这可以包括在页面加载之后从外部源导入或插入CSS,或者如果需要的话放入一个jQuery jQuery。我将为典型的气球提供一个代码模板。请注意,这实际上适用于Google地球程序,但不在线。
</Placemark>
<Placemark id="placemark1">
<name>City</name>
<description>
<![CDATA[<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<link href="http://localhost/Kmz_Files/player.css>
<div class="container" >
<span class = "title">My location</span>
<hr>
<div>
<a href="http://www.google.com" target="_blank">
<img src="http://www.google.ca/images/srpr/logo3w.png" width="250" />
</a>
</div>
<hr>
<p> My description</p>
</div>
</body>
</html>]]>
</description>
<Point>
<coordinates>-45, 45</coordinates>
</Point>
</Placemark>