Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 特定于设备的媒体查询_Iphone_Css_Media Queries - Fatal编程技术网

Iphone 特定于设备的媒体查询

Iphone 特定于设备的媒体查询,iphone,css,media-queries,Iphone,Css,Media Queries,我正在尝试使用媒体查询来定位特定设备,但无法使样式正常工作。我在测试环境中尝试的一个例子是针对iPhone 5,如下所示: @media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) { .our-aim, .freedom, .quote, .bullet-list { font-family: "aktiv-grotesk-s

我正在尝试使用媒体查询来定位特定设备,但无法使样式正常工作。我在测试环境中尝试的一个例子是针对iPhone 5,如下所示:

@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 568px)
and (orientation : landscape)  {
.our-aim, .freedom, .quote, .bullet-list {
font-family: "aktiv-grotesk-std-i3","aktiv-grotesk-std",sans-serif; 
font-style: italic;
font-weight: 300;
font-size: 1.2em;
}
}
@media only screen 
and (min-device-width: 320px) 
and (max-device-width: 568px) 
and (orientation : portrait) {
.our-aim, .freedom, .quote, .bullet-list {
font-family: "aktiv-grotesk-std-i3","aktiv-grotesk-std",sans-serif; 
font-style: italic;
font-weight: 300;
font-size: 1em;
}
h2 {
    font-size:1.5em;
}
}
这是错的吗


<>可以帮助吗?

你也应该考虑查询中的设备像素比率。可能重复:是否有针对特定设备的原因?媒体查询并不是真的要做到这一点,尽管有时候是可能的(但往往是脆弱的)。