为什么html地图和区域无法在手机上使用?

问题描述 投票:0回答:1

它在我的笔记本电脑上的Chrome浏览器上运行正常,但在我的移动智能手机上根本无法运行。有没有人解决过这个问题?

<img id="image" src="login.jpg" width="1080" height="2160" usemap="#Map" >
<map name="Map">
  <area target="_self" shape="rect" coords="272,1625,820,1740" href="buyer_profile.html">
  <area target="_self" shape="circle" coords="814,2088,40" href="back.html">
</map>
html dictionary mobile area
1个回答
0
投票

刚刚发现视口的高度和宽度与图像尺寸不同。就我而言,我必须将地图区域坐标除以3,现在一切都很好。

一种很好的解决方案是可以根据图像大小和实际视口大小之间的比率动态调整坐标。

© www.soinside.com 2019 - 2024. All rights reserved.