/*DIV横屏*/
function horizontalScreen(el) {
/*设置标记*/
if (sys_is_horizontalScreen == 1) { return }
sys_is_horizontalScreen = 1
/*transform 强制横屏*/
var conW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var conH = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
/*其他样式判断*/
el.css({
"transform": "rotate(90deg) translate(" + ((conH - conW) / 2) + "px," + ((conH - conW) / 2) + "px)",
"width": (conH) + "px",
"height": (conW) + "px",
"transform-origin": "center center",
"-webkit-transform-origin": "center center"
});
}
/*DIV竖屏*/
function longitudinalScreen(el) {
/*设置标记*/
sys_is_horizontalScreen = 0
/*transform 强制横屏*/
var conW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var conH = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
/*其他样式判断*/
el.css({
"transform": "rotate(0deg)",
"width": (conW) + "px",
"height": (conH) + "px"
});
}