我有一个布局iPhone网页的问题,我的背景图像不适合safari (在iPhone4中)的视图,我的背景图像大小:w:480 px / h:720px
。
my body css代码:
body
{
height:100%;
margin:0px;
background-image:url(../images/bg.png);
background-repeat:no-repeat;
background-size: cover;
}
实际上,我真的不知道视网膜显示器和普通3g显示器的背景分辨率应该是多少…以及如何调整它们。
如果有人能帮我,我会很高兴...
发布于 2012-06-19 13:52:42
您好,请使用此代码,而不是您的身体:
body{
font-size:100%;
background:url(../images/bg.png) no-repeat center top;
background-size:100% auto;
margin:0 auto;
}
https://stackoverflow.com/questions/11005992
复制相似问题