底部固定 div 被 Android 键盘推起

Nic*_* Bb 7 html css reactjs

我在底部有一个固定的 div,但在响应视图中,在 android 中,它被键盘推上来。

const ContactBackgroundImage = styled.div`
  color: white
  padding: 50px
  height: 118px
  position: fixed
  bottom: 0
  left: 0
  right: 2px
  text-align: left
  background-position: top
  background-repeat: no-repeat
  background-image: url('/Images/background.png');
  @media (max-width: 480px) {
    background-position: left top
  }
`;
Run Code Online (Sandbox Code Playgroud)

然后我的 div 正在渲染它。

<ContactBackgroundImage/>
Run Code Online (Sandbox Code Playgroud)

当应用程序在 Android 手机中处于响应模式时,键盘会将 div 向上推。我希望 div 留在 kaboard 的底部 在此输入图像描述

小智 0

// 想要添加评论但没有足够的声誉,所以我将其作为答案发布,如果错误则删除。

您是否尝试过为您的 div 设置 z-index ?也许它与 Android 键盘位于同一层,因此会被推送。