横屏竖屏监控

2018-05-29  本文已影响0人  岳小弟

//横屏竖屏监控
var evt = "onorientationchange" in window ? "orientationchange" : "resize";
window.addEventListener(evt, resize, false);
function resize(fals) {
if (window.orientation == 0 || window.orientation == 180) {
documment.getElementsByClassName('swiper-container')[0].style.width = '100%'
}
}

上一篇下一篇

猜你喜欢

热点阅读