【发布时间】:2017-11-05 14:44:17
【问题描述】:
我希望将一些样式应用于智能手机,无论是纵向还是横向。
是否有针对这两种情况的良好媒体查询?实际上我必须用两个媒体查询重复css:
.selector {
// smartphone portrait
@media (min-width: 320px}) and (max-width: 512px}) {
// stuff
}
// smartphone landscape
@media only screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape) {
// same stuff
}
}
【问题讨论】:
标签: html css media-queries stylesheet