首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为iPhone找出合适大小的背景图像

如何为iPhone找出合适大小的背景图像
EN

Stack Overflow用户
提问于 2013-09-01 06:15:07
回答 1查看 224关注 0票数 1

我正在使用媒体查询来创建屏幕分隔符,以便有一个在桌面和移动都优化的网站。目前,当我使用当前的css打开站点时,背景图片被放大到不成比例。(当前背景尺寸为: 640px x 960px。)

下面是当前的css:

代码语言:javascript
复制
@media only screen and (-webkit-min-device-pixel-ratio : 2), only screen and (min-device-    pixel-ratio : 2) {

    #home{width: 980px;
        height: 1090px;
        background-image: url(../images/landingPageRetina.jpg) 50% 0 no-repeat;
        background-size: 100% 100%;}

    #about{background-image: url(../images/aboutMobile.png) 50% 0 no-repeat;}


    #music{background-image: url(../images/musicMobile.jpg)  50% 0 no-repeat;}

    #videos{background-size: url(..images/videosMobile.jpg)50% 0 no-repeat;}

    #connect{background-image: url(..images/connectMobile.jpg)50% 0 no-repeat ;}

    #contact{background-image: url(../images/contactMobile.jpg)50% 0 no-repeat ;}
}

有没有人对正确的大小有什么建议--这样图像才能按比例渲染?

EN

回答 1

Stack Overflow用户

发布于 2013-09-01 08:04:47

iPhone5为640x1136。有关更多详细信息,请参阅smashing杂志的这篇文章:http://mobile.smashingmagazine.com/2013/03/21/responsive-web-design-with-physical-units/

最好的背景是不需要太多媒体查询就能让它看起来很好的背景。尝试CSS3渐变或平铺背景...

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18553314

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档