有没有办法在css中执行此操作?
@media screen and (min-width < min-height)
我开始写一个前端库,我希望根据这个条件“响应”。
答案 0 :(得分:9)
检查方向,例如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"
}
}