我有一个媒体查询来检查屏幕高度,如下所示,但是无论屏幕高度(1200还是1050)如何,只有第一个查询适用,并将高度设置为94%。谁能帮我解决这个问题。
谢谢
@media screen and (min-device-width: 1920px) and (max-device-height: 1200px) {
.tab-content-parent-ht {
height:94%;
}
}
@media screen and (min-device-width:1920px) and (max-device-height: 1050px) {
.tab-content-parent-ht {
height:91.5%;
}
}
您的语法对我来说很好。您是否正在使用不同的物理屏幕进行测试,因为max / min-device-height将检查屏幕的物理高度,而不是查看端口或浏览器窗口。