在编写CSS媒体查询时,有什么方法可以用"OR"逻辑指定多个条件吗?
我试图做这样的事情:
/* This doesn't work */
@media screen and (max-width: 995px OR max-height: 700px) {
...
}
Run Code Online (Sandbox Code Playgroud) 这可能吗?对我来说这似乎是一个很好的解决方案,但我不确定它是否会起作用.
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Code for both portrait and landscape */
@media (orientation:portrait) {
/* Code for just portrait */
}
@media (orientation:landscape) {
/* Code for just landscape */
}
}
Run Code Online (Sandbox Code Playgroud)