只是想知道是否有其他人经历过iPad/iPhone缩放他们的背景图像以适应视口.
在我的情况下,我通过javascript交换背景图像,新的背景图像超宽,适合大型显示器.但是,iPad正在缩小通过javascript添加到DOM的背景图像.我通过使用"-webkit-background-size"设置为图像应该的大小来解决这个问题,但这会导致背景图像被拉伸和像素化.
整页背景图片显示iPhone和iPad上的剪切(safari iOS 5.01).http://www.theantarcticbookofcookingandcleaning.com
如果你能给我一些建议,那就太好了.感谢您的帮助!
屏幕截图如下: http ://www.soojincreative.com/photo.PNG
使用的代码 - >背景图片在#wrapper中:
enter code here
body {
font: normal normal 16px/22px "Kingfisher Regular", Georgia, "Times New Roman", serif;
font-size-adjust: 0.47;
color: #000;
background-color: #e3e8ee;
margin-top: -13px;
}
#wrapper {
padding-top:none;
background: url('images/background2.jpg') no-repeat center;
width: 1280px;
margin: 0 auto;
overflow:hidden;
}
Run Code Online (Sandbox Code Playgroud)