我有一个类似的问题,这个:Software keyboard resizes background image on AndroidAndroid的软键盘调整大小的背景图像(网站)
给出有针对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解决方案欢迎。
是啊......这个问题可能对你有帮助.http://stackoverflow.com/questions/11099930/100-width-background-image-with-an-auto-height – Ali786
这里有一个想法,试着'背景 - 附加:固定'http://www.w3schools.com/cssref/pr_background-attachment.asp – sweeds
'背景附件:固定'没有工作,但感谢sweeds调查:)我找到了一个解决方案下面。 – osteopathx