作者:港1009 | 来源:互联网 | 2023-05-19 04:27
IamdevelopingahybridappwithCordova.Ihaveusedvhandvwtolayoutmydesignandsizeevery
I am developing a hybrid app with Cordova. I have used vh and vw to lay out my design and size everything, so that slight differences in screen size all work well. My issue is that on Android, when the keyboard opens the value of vh changes from full screen to the portion of the screen still visible above the keyboard. This doesn't occur on iOS.
我正在开发与Cordova的混合应用程序。我已经使用vh和vw来设计我的设计并调整所有尺寸,因此屏幕尺寸的细微差别都能很好地工作。我的问题是在Android上,当键盘打开时,vh的值从全屏变为键盘上方仍然可见的屏幕部分。这在iOS上不会发生。
Any ideas on how to get around this? Should I totally change my layout strategy to use another type of dimension in css? Should I figure out the screen dimensions, then set all the heights with js (which seems terrible)? Any help with best practices would be great.
关于如何解决这个问题的任何想法?我应该完全改变我的布局策略,以便在css中使用其他类型的维度吗?我应该弄清楚屏幕尺寸,然后用js设置所有高度(看起来很糟糕)?任何有关最佳实践的帮助都会很棒。
Thanks,
Scott
1 个解决方案