公司需要写一个横屏时的友好提示功能,这里利用了 orientation: landscape
@media (orientation: landscape) {
body .swiper-container, html .swiper-container {
display: none;
}
body .orientation, html .orientation {
display: block;
}
}
竖屏时为:
orientation : portrait