2

所以我们有一个移动网站,我们在其中使用图像映射来创建链接等。当设备处于横向时我们遇到问题,我们无法向下滚动以查看完整图像。图像为 640X960。我们正在 Galaxy S4 上进行测试。

HTML

<img src="mobilelandscape.png" usemap="#Mapland" border="0" class = "landscape"  />
<map name="Mapland" id="Mapland">
  <area shape="rect" coords="532,286,879,468" href="contact.php" alt="Contact Us" />
  <area shape="rect" coords="398,497,930,685" href="index.php" alt="My account" />
  <area shape="rect" coords="382,696,907,870" href="newcust.php" alt="New Customers" />
</map>

css

.landscape{
    display:block;  
    width:100%;
}

body{
    overflow:auto
}

基本上当图像适合屏幕时,它不会显示整个图像,只是顶部和主体似乎切断了其余部分,无法向下滚动查看图像的其余部分,我们已经尝试了一切没有将图像高度设置为height:100%,我们似乎找不到任何解决此特定问题的方法。有人有想法么?

4

1 回答 1

0

使用 Jquery 设置图像的高度。

例子:

$('#thingYouAreHavingIssuesWith').css({
    'height' : $(window).height()
});
于 2013-07-26T01:58:24.407 回答