CSS判断横竖屏幕方法:

css判断横竖屏幕:

/* portrait */
@media screen and (orientation:portrait) {
/* 正常情况下 */
/* portrait-specific styles */

}

/* landscape */
/* 宽屏情况下 */
@media screen and (orientation:landscape) {

/* landscape-specific styles */

}

猜你喜欢

转载自blog.csdn.net/weixin_39717076/article/details/82017827