I use the bellow code for fixing screen sizes as bb10 device height and width but the problem is when I scroll app on bb10 device up it scrolls whole app on up side and when I scroll down it scrolls whole app on down side. Please help me how to fix it.

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

有帮助吗?

解决方案

To set the viewport you should be using this newer method. The way you've done it used to work , but this is now the recommended way:

<!-- set viewport -->
<script>
  var meta = document.createElement("meta");
  meta.setAttribute('name','viewport');
  meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no');
  document.getElementsByTagName('head')[0].appendChild(meta);
</script>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top