【问题标题】:Android soft keyboard resizes background image (website) [duplicate]Android软键盘调整背景图像大小(网站)[重复]
【发布时间】:2015-07-05 10:30:34
【问题描述】:

我也有类似的问题:Software keyboard resizes background image on Android

那里提供的解决方案适用于 Android 开发。他们没有帮助。我正在为一般使用 CSS/JavaScript 的网站寻找解决方案。

我当前的 CSS:

#video_mob {
position: fixed;
background: url(../terminal/background.gif) no-repeat center center fixed;
background-size: cover;
-webkit-background-size: cover;
top: 0px;
left: 0px;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -1000;
overflow: hidden;
}

一种选项可以修复它,但背景实际上会向上移动。

-webkit-background-size: 280% auto;

还有什么想法吗?欢迎使用 CSS 或 JS 解决方案。

【问题讨论】:

标签: android css


【解决方案1】:

啊,找到了解决方案!傻我。

仅供参考,这是要求:

background: url(../terminal/background.gif) no-repeat center top fixed;
background-size: 280% auto;

必须将位置设置为居中。

【讨论】:

  • 如果这解决了您的问题,请将您的解决方案标记为答案......看起来确实如此。
  • 我得等 2 天才能做到这一点,哈哈
  • 2 天过去了 :)
猜你喜欢
  • 2011-07-15
  • 2011-05-16
  • 2015-06-18
  • 2017-02-25
  • 2019-11-17
  • 1970-01-01
  • 2011-10-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多