如何使用mediaquery知道视口宽度是否大于其高度

Gwy*_*nFR 5 css css3 media-queries

有没有办法在CSS中执行此操作? @media screen and (min-width < min-height)

我开始写一个前端库,我想根据这个条件"响应".

fca*_*ran 10

检查方向,例如http://codepen.io/anon/pen/LVXzvK

@media all and (orientation: landscape) {
  body:after {
     content: "width is greater than height"
  }
}

@media all and (orientation: portrait) {
  body:after {
     content: "height is greater than width"
  }
}
Run Code Online (Sandbox Code Playgroud)