(Cordova) 常见问题及其解决方案

2022-05-20  本文已影响0人  布呐呐u

1)打开工程中index.html文件
2)在<head>标签下添加如下标签

<meta charset="UTF-8">

1)打开工程中index.html文件
2)在<head>标签下添加如下标签

<meta name="viewport" content="width=device-width">

⚠️⚠️⚠️ 如果由于某种原因无法进行此更改,则可以使用touch-action属性在页面或特定元素上实现相同的效果(Firefox 不支持这种技术)

html {
    touch-action: manipulation;
}

1)打开工程中config.xml文件
2)在widget节点下,新增如下标签

<!-- Don't block any requests -->
<access origin="*" />

<!-- Allow all unrecognized URLs to open installed apps *NOT RECOMMENDED* -->
<allow-intent href="*" />

<!--  A wildcard can be used to allow the entire network, over HTTP and HTTPS. This is *NOT RECOMMENDED*  -->
<allow-navigation href="*" />
上一篇 下一篇

猜你喜欢

热点阅读