When the H5 page of Android phone pops up on the keyboard, the background is compressed. How to solve it?

H5 page in Android phone, when focusing on input, it obscures input, and then looks for online information. The following methods are added to JS

$("-sharpmobile,-sharprealName,-sharpmobile").on("focus", function() {
    var _this = this;
    setTimeout(function(){
      _this.scrollIntoView(true);
    },200);

but another problem arises, the background image is compressed and deformed, how to solve it? I have tried several methods on the Internet, but none of them work, as shown in the following figure

Mar.08,2021

ideas:

var HEIGHT = $('body').height();
$(window).resize(function () {
    $('.outdiv').height(HEIGHT);
});

change the image location to absolute,width


css, set a background attribute

Menu