iPhone 4s正确呈现媒体查询的问题

时间:2013-09-01 18:12:12

标签: iphone ios css media-queries

我一直在研究这个问题。我认为我对iPhone 4s(视网膜)有适当的媒体查询;但是,Safari Mobile无法正确呈现样式表。大多数问题是背景图像根本不渲染。背景图片的大小(每个部分)为640px x 960px。它们也保存为.jpg文件。这是iPhone的样式表:

@media (min--moz-device-pixel-ratio: 2),
   (-o-min-device-pixel-ratio: 2/1),
   (-webkit-min-device-pixel-ratio: 2),
   (min-device-pixel-ratio: 2),
   (min-resolution: 192dpi),
   (min-resolution: 2dppx) {

/* Home Section */
#home{width: 100%;
    height: 480px;
    background-image: url(../images/landingPageRetina.jpg) 50% 0 no-repeat;
    background-size: 320px 480px;}

#navbar{display: none;}

#albumCover{width: 250px;
    height: 250px;
    margin-top: 175px;}

#albumCover p{font-size: 5em;}

/* About Section */
#about{width: 100%;
    height: 480px;
    background-image: url(../images/aboutRetina.jpg) 50% 0 no-repeat;
    background-size: 320px 480px;}

.info{width: 260px;
    height: 260px;
    margin: 100px 0 0 100px;}

.headline{font-size: 2em;
    margin: -20px 0 5px 0;}

.info p{padding-top: 30px;
    font-size: .875em;
    margin-bottom: -100px;}

/*Music Section */  
#music{width: 100%;
    height: 480px;
    background-image: url(../images/musicMobile.jpg) 50% 0 no-repeat;
    background-size: 320px 480px;
    position: fixed;}

.info ul li{text-align: center;
    font-family: eb-garamond, sans-serif;
    font-size: 1.5em;
    line-height: 2em;
    text-transform: capitalize;}

    /* Lighthouse */
    iframe{width: 50%;
        height: 50%;}

    #close{margin: 50px 0 15px 350px;
        padding: auto 5px;}

/*Videos Section */ 
#videos{width: 100%;
    height: 480px;
    background-size: url(..images/videosMobile.jpg);
    background-size: 320px 480px;}

/*Connect Section */    
#connect{width: 100%;
    height: 480px;
    background-image: url(..images/connectMobile.jpg);
    background-size: 320px 480px;}

/*Contact Section */    
#contact{width: 100%;
    height: 480px;
    background-image: url(../images/contactMobile.jpg);
    background-size: 320px 480px;}

#email a{font-size: .625em;}

.primeLine{font-size: 1em;}

#email li{margin: 0;}
}

我已经用尽所有其他资源,有没有人有任何想法?

0 个答案:

没有答案