媒体查询,横竖屏

orientation

语法:

orientation:portrait | landscape

portrait:指定输出设备中的页面可见区域高度大于或等于宽度

landscape:除portrait值情况外,都是landscape

 1 @media screen and (orientation: portrait){
 2   .test::after {
 3     content: "竖屏";
 4   }
 5 }
 6 @media screen and (orientation: landscape){
 7   .test::after {
 8     content: "横屏";
 9   }
10 }


猜你喜欢

转载自www.cnblogs.com/vaso-me/p/11492193.html
今日推荐