本文介绍了渐进的Web应用程序 - 不遵守屏幕方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的网络应用不符合在 manifest.json 中设置的方向: manifest_version:2,version:1,name:我的应用程序,short_name:我的应用程序,图标:[ {src:img / myapp / launcher-icon-0-75x.png,sizes: 36x36,type:image / png}, {src:img / myapp / launcher-icon-1x.png, sizes:48x48,type:image / png}, {src:img / myapp / launcher -icon-1-5x.png,sizes:72x72,type:image / png}, { src:img / myapp / launcher-icon-2x.png,sizes:96x96,type:image / png}, {src:img / myapp / launcher-icon-3x.png,sizes:144x144,type:image / png }, {src:img / myapp / launcher-icon-4x.png,si zes:192x192,type:image / png} ],theme_color:#43c1b1,background_color :#43c1b1,start_url:/ myapp,scope:/ myapp,orientation:landscape, display:standalone } 其他所有工作 - 图标和背景颜色,为什么会出现问题迫使风景? b $ b Chrome(移动版)v 57.0.2987 感谢您的原始manifest.json是正确的,但它只适用于Chrome Canary(版本59),但不适用于Chrome Stable(版本57)。 我无法在发布日志中找到任何提及。 My web app is not honouring the orientation set in my manifest.json:{ "manifest_version": 2, "version": "1", "name": "My App", "short_name": "My App", "icons": [ { "src": "img/myapp/launcher-icon-0-75x.png", "sizes": "36x36", "type": "image/png" }, { "src": "img/myapp/launcher-icon-1x.png", "sizes": "48x48", "type": "image/png" }, { "src": "img/myapp/launcher-icon-1-5x.png", "sizes": "72x72", "type": "image/png" }, { "src": "img/myapp/launcher-icon-2x.png", "sizes": "96x96", "type": "image/png" }, { "src": "img/myapp/launcher-icon-3x.png", "sizes": "144x144", "type": "image/png" }, { "src": "img/myapp/launcher-icon-4x.png", "sizes": "192x192", "type": "image/png" } ], "theme_color": "#43c1b1", "background_color": "#43c1b1", "start_url": "/myapp", "scope": "/myapp", "orientation": "landscape", "display": "standalone"}Everything else works - the icons and the background colour so why would there be a problem forcing landscape?Chrome (on mobile) v 57.0.2987Thanks 解决方案 Your original manifest.json is correct but it only works on Chrome Canary (version 59) but not on Chrome Stable (version 57).I was unable to find any mention of it in the release logs though. 这篇关于渐进的Web应用程序 - 不遵守屏幕方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 21:36