为什么不't锚只适用于Firefox中的地图坐标
Why don't anchors work on map coordinates in Firefox only?
我有这段代码用于我正在制作的地图。但由于某些原因,<a>
Before <area>
不能仅在firefox上工作。在chrome或IE上,你可以悬停并看到一些可以点击的东西,但不能用firefox。有什么帮助吗?
<p>
<img alt="California map showing counties" border="0" height="1015" src="http://imjesuschiko.com/doc/map.png" usemap="#ca_map_counties_Map" width="834">
<map id="ca_map_counties_Map" name="ca_map_counties_Map">
<a href="http://google.com"><area alt="Sacramento" coords="223,369, 227,364, 231,364, 235,367, 259,370, 263,376, 264,393, 264,404, 251,412, 239,412, 225,420, 220,428, 208,432, 214,426, 219,421, 223,416, 222,408, 227,403, 231,380" shape= "poly"></a>
</map>
</p>
http://liveweave.com/69610i
我刚刚完成了对ie、ff和chrome的最后一个版本的检查。
我发现的解决方案是:
$(function () {
$('#ca_map_counties_Map').parent('a:first').on('click', function(e) {
e.preventDefault();
window.location.href = $(this).attr('href');
});
});
area {
display: inline;
cursor: pointer;
}
a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
z-index: 1000;
}
img {
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
height: 1015px;
width: 834px;
}
<script src="//code.jquery.com/jquery-1.11.3.js"></script>
<p>
<a href="http://google.com"><map id="ca_map_counties_Map" name="ca_map_counties_Map">
<area alt="Sacramento" coords="223,369, 227,364, 231,364, 235,367, 259,370, 263,376, 264,393, 264,404, 251,412, 239,412, 225,420, 220,428, 208,432, 214,426, 219,421, 223,416, 222,408, 227,403, 231,380" shape="poly">
</map></a>
<img alt="California map showing counties" border="0" height="1015" src="http://imjesuschiko.com/doc/map.png" usemap="#ca_map_counties_Map" width="834">
</p>
相关文章:
- firefox(谷歌地图)中未触发的点击事件
- Chrome没有请求JS源地图,但Firefox请求
- firefox中没有显示谷歌地图
- 嵌入式谷歌地图仅在IE上加载,但既不能在Mozilla Firefox上加载,也不能在Google Chrome上加载
- 老.在IE和Firefox上覆盖滚动地图
- 我制作了一个可以改变大小的谷歌地图,但它在 Firefox 中不起作用
- 当使用HTML5地理定位(使用Meteor js)时,谷歌地图不会显示在Firefox上
- 地图未在 Firefox 和 ie/edge 上使用 openlayers 3 加载
- 通过https在Firefox中加载Google 地图api V3时出现问题
- 谷歌地图代码显示当前位置,并在Php:-Firefox中触摸时创建新标记
- 谷歌地图监听器在firefox中加载良好,但在其他浏览器中则不然
- 为什么不't锚只适用于Firefox中的地图坐标
- 为什么谷歌地图API没有加载到firefox上
- 谷歌地图API没有;在Chrome和Firefox中声明DOCTYPE时不起作用
- 谷歌地图标记显示在IE中,但不显示在chrome或firefox中
- Polymer 1.0/传单地图中动态创建的标记不会在Firefox中渲染
- 谷歌地图在Firefox中没有居中
- 谷歌地图API -地图不显示在Firefox
- 谷歌地图V3无法在Chrome、Firefox中显示
- 当地图移动时,必应地图InfoBox会在FireFox和Chrome中移动位置