【问题标题】:Mobile site in landscape wont scroll down横向移动网站不会向下滚动
【发布时间】:2013-07-26 09:58:24
【问题描述】:

所以我们有一个移动网站,我们在其中使用图像映射来创建链接等。当设备处于横向时,我们遇到了一个问题,我们无法向下滚动以查看完整的图像。图像为 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% 的所有方法,我们似乎找不到任何解决此特定问题的方法。有人有什么想法吗?

【问题讨论】:

  • 需要更多详细信息...涉及任何 div 或任何东西?也许更多的 HTML 会有所帮助...

标签: html css image


【解决方案1】:

使用 Jquery 设置图像的高度。

例子:

$('#thingYouAreHavingIssuesWith').css({
    'height' : $(window).height()
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-06
    • 1970-01-01
    • 2012-06-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多