jVectorMap标签不可见,为什么?

编程入门 行业动态 更新时间:2024-10-27 23:24:20
本文介绍了jVectorMap标签不可见,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在网页上创建了一个带触发器的滑块面板。 在这个面板上我放置了jVectorMap。 它运行正常(当我打开滑块面板时地图是可见的)只是国家标签不可见。 有谁知道为什么?

I created a slider panel with a trigger on a webpage. On this panel I placed the jVectorMap. It works fine (the map is visible when I open the slider panel) just the Country labels are not visible. Anybody knows why?

代码部分:

$(".trigger").click(function(){ $(".panel").toggle("fast"); $(this).toggleClass("active"); return false; }); colors = {}; colors['it'] = '#76ced9'; $('#map').vectorMap({ map: 'europe_en', //map: 'jquery-jvectormap-europe-en', onLabelShow: function(event, label, code){ if (code == 'it') { event.preventDefault(); } else if (code == 'it') { label.text('bla bla bal'); } }, colors: colors, hoverOpacity: 0.7, // opacity for :hover hoverColor: false });

以下是面板的创建方式(我删除了一些部件以便您可以看到代码):

Here is how the panel is created(I removed some parts to so you can see the code):

<div class="panel" style="z-index:10;"> <h3>Our Destinations</h3> <div id="map" style="width: 600px; height: 550px;"></div>

<a class="trigger" href="#">Map</a>

我在想,可能因为面板超过html,标签可能不可见因为它落后但我无法弄清楚在哪里放z-index:10; 但问题可能是其他问题。 如果你有敏锐的眼睛和头脑,你可能会给我一个很好的建议。 Thanx, K

I was thinking that maybe since the panel is over the html it is possible that the label is not visible because it is behind but I could not figure out where to put the z-index:10; But it is possible that the problem is something else. If you have a sharp eye and mind you might give me a great suggestion. Thanx, K

推荐答案

你有没有失去jquery.vector-map.css样式表在这个过程中?这会导致标签和缩放按钮消失。

Did you by any chance lose the jquery.vector-map.css stylesheet in the process? This would cause the labels and zoom buttons to disappear.

更多推荐

jVectorMap标签不可见,为什么?

本文发布于:2023-11-15 05:04:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591391.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标签   jVectorMap

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!