Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery BlackBerry Webworks滚动超过宽度或高度_Jquery_Html_Css_Blackberry Webworks - Fatal编程技术网

Jquery BlackBerry Webworks滚动超过宽度或高度

Jquery BlackBerry Webworks滚动超过宽度或高度,jquery,html,css,blackberry-webworks,Jquery,Html,Css,Blackberry Webworks,移动应用程序的基本布局为: html布局: <div id="title">Title</div> <div id="tabs">Some tabs</div> <div id="container" x-blackberry-focusable="true"> <div id="contents" style="width: "1000px;" height: "1000px;"> <div x-blackberry

移动应用程序的基本布局为:

html布局:

<div id="title">Title</div>
<div id="tabs">Some tabs</div>
<div id="container" x-blackberry-focusable="true">
<div id="contents" style="width: "1000px;" height: "1000px;">
<div x-blackberry-focusable="true" onmouseover="highlight(this)" onmouseout="noHighlight(this)">I am some content">
 . 
 .
 .
<div x-blackberry-focusable="true" onmouseover="highlight(this)" onmouseout="noHighlight(this)">I am some content"> 
</div>
</div>
我使用jQuery设置手机屏幕的宽度和高度,以检测手机屏幕的宽度和高度,使其适合不同版本的黑莓手机。jQuery还用于检测div#title、div#tabs和div#container的宽度。最后,通过使用div#title和div#tabs高度减去屏幕高度来计算div#container的高度

div#容器内的内容物始终大于div#容器的高度或宽度。例如,在Torch 9800上,屏幕为360x480 div#container将为360x390,那么内部的任何内容都将大于div#container

即使我设置了div#container overflow:auto,当我使用触控板或轨迹球滚动div#container内部的内容时,它也永远不会超过div#container的宽度或高度,即使内部容器比div#container大

谁能帮帮我吗。我已经坚持了几个星期,真的迷失了方向

谢谢。

试试这个-

  #container{
      overflow: scroll;
      -webkit-overflow-scrolling: touch;
  }
注意:如果容器/内容具有位置属性(绝对或相对),它将无法正常工作。BB OS6及以上版本使用webkit

  #container{
      overflow: scroll;
      -webkit-overflow-scrolling: touch;
  }