![](/img/trans.png)
[英]Applying Styles in media queries which has same width but different height
[英]Media queries which work for both width and height
我有一個媒體查詢來檢查屏幕高度,如下所示,但無論屏幕高度(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%;
}
}
您可以像下面這樣修改您的代碼:
@media screen and (min-device-width: 1920px) and (min-device-height: 1051px) {
.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%;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.