iPad条件CSS不起作用

iPad条件CSS不起作用,css,ipad,conditional,media-queries,Css,Ipad,Conditional,Media Queries,我已经阅读了这里的几个问题,以及谷歌搜索的东西,我发现了很多原因,我不能让我的工作在iPad上。我能够让它在iPhone上工作,但iPad仍然显示我的bg img。这些都是我尝试过的问题,结果空手而归 @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) { body.custom-background { background-color: #FFFFFF; b

我已经阅读了这里的几个问题,以及谷歌搜索的东西,我发现了很多原因,我不能让我的工作在iPad上。我能够让它在iPhone上工作,但iPad仍然显示我的bg img。这些都是我尝试过的问题,结果空手而归

    @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) {

body.custom-background {

    background-color: #FFFFFF;
    background-image: none;

}
}

@media only screen and (min-width: 481px) and (max-width: 1024px) {

body.custom-background {

    background-color: #FFFFFF;
    background-image: none;

}
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {

body.custom-background {

    background-color: #FFFFFF;
    background-image: none;

}
}

@media handheld and (max-device-width: 480px) {

body.custom-background {

    background-color: #FFFFFF;
    background-image: none;

}
}

也许你的html脑袋里有
Meta
。像这样:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

第三个媒体查询是正确的。第四个对iPad来说没有意义。我们能看到你的HTML吗?第四个查询是针对iPhone的。抱歉,我没有指定。我查看了index.php文件,链接的handled.css只设置为media-type-handled,所以我将其设置为handled,screen。更换后,iphone和ipad都工作正常,没有显示背景图像,但在桌面上查看时,也没有显示图像。现在掌上电脑中只有三个和四个查询。
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {

body.custom-background {

    background-color: #FFFFFF;
    background-image: none;

}
}