我正在尝试使用 qTip jquery 插件将谷歌地图显示为工具提示。我页面上有很多元素,需要为所有元素分配“overflow:hidden”。一切都很好,除了谷歌地图工具提示似乎不起作用(只显示带有谷歌徽标和服务条款的空白地图)。我需要将隐藏的溢出应用到除工具提示块之外的所有块。当我消除全局溢出时,地图显示没有问题。我是否错误地使用了 CSS 属性?我怎样才能解决这个问题?代码如下。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.js"></script>
<script type="text/javascript" src='jquery.qtip-1.0.0-rc3.min.js'></script>
<script type="text/javascript" src="http://maps.google.com/maps/apijs?sensor=false"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
geocoder = new google.maps.Geocoder();
jQuery('td.a').each(function(i){
jQuery(this).qtip({
content: {
text: '<div id="map_canvas_'+i+'" latlon="'+jQuery('td.a').attr('tooltip')+'" addr="'+jQuery('td.a').attr('address')+'" style="width: 450px; height: 300px"></div>'
},
show: {
delay: 500,
when: 'click',
solo: true,
effect: { type: 'grow', length: 310 }
},
hide : {
when : {
event : 'unfocus'
}
},
position: { adjust: { …Run Code Online (Sandbox Code Playgroud)