【问题标题】:Responsive page in cordova application don't responsive only on real phone科尔多瓦应用程序中的响应页面仅在真实手机上不响应
【发布时间】:2019-03-25 13:38:17
【问题描述】:

我在玩 cordova 和 angularjs。

我有一个简单的 angularjs(基于 angular-seed)应用程序,当我在 pc chrome 中对其进行测试时,它看起来像是响应式的:

(屏幕宽度和我的手机一样)

但是当我用cordova构建apk并安装在手机上时,我看到了巨大的水平滚动:

我尝试用谷歌搜索,但没有找到任何线索。我能做错什么?

如果我只使用此页面 https://getbootstrap.com/docs/4.0/examples/album/# 并构建 cordova 应用程序,我也会看到相同的水平滚动。

【问题讨论】:

标签: angularjs twitter-bootstrap cordova responsive


【解决方案1】:

在 index.html 中添加这个 Meta

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

【讨论】:

  • 不,即使有这样的参数仍然水平滚动。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-20
  • 1970-01-01
相关资源
最近更新 更多