遇到一个 iOS 键盘问题,简单描述一下就是这 HTML 中,内容允许输入之后会弹出软键盘,这时候 webView 里面的 Fixed 元素并不会随着更新位置。原因如下:

    While in all other browsers the addition of the software keyboard restricts the browser window, and thus the visual viewport, on iOS the software keyboard is an independent layer that’s shown on top of the browser window. The browser window does not react in any way to the appearance or disappearance of the keyboard. The visual viewport does not change, and the resize event does not fire.

    那么如何来解决?

    技术资源: https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html