如何使用媒体查询知道视口宽度是否大于其高度

How to know if the viewport width is greater than its height using a mediaquery

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

开始写前端库,希望"responsive"基于这个条件

检查方向

@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"
  }
}