设备特定媒体查询

时间:2014-02-21 13:35:01

标签: css iphone css3 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-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;
}
}

这是错的吗?

有人可以帮忙吗?

0 个答案:

没有答案