【发布时间】:2016-10-24 17:12:36
【问题描述】:
我在将移动设备页面的背景图像设置为专为移动设备设计的新图像时遇到了问题。该图像设置为background-size: cover,并且在除移动 Chrome 之外的所有内容中都可以正常工作。在移动 Chrome 中滚动时,图像会略微调整大小。该设计还具有绝对页脚。你可以在这里看到它的实际效果:
body {
height: 100%;
overflow: scroll;
}
.image {
display: block;
background: url(http://drawingimage.com/files/1/Shrek-Donkey-Beautiful-Image-Drawing.png) no-repeat center bottom;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.footer {
display: block;
position: absolute;
width: 100%;
bottom: -69px;
background-color: green;
}
<body>
<div class="wrap">
<div class="image">
</div>
<div class="footer">
<p> Footer info </p>
<p> More footer info</p>
</div>
</div>
</body>
【问题讨论】:
-
如果此处没有任何帮助,您可能需要将此报告为错误。
标签: javascript jquery html css jquery-mobile