webapp強制橫屏如何實現?中國撲克大賽 <img src=" (){ var contain = document.getElementById('contain'); var cheight = document.body.clientHeight ; var body = document.getElementsByTagName('body').item(0); var hw = window.innerWidth; var hh = window.innerHeight; if(window.orientation==180||window.orientation==0){ body.style.width = hh + 'px'; body.style.height = cheight+'px'; body.style.webkitTransform = body.style.transform = 'rotateZ(90deg)'; }else } </script> 按照我自己的思路就是把整個body翻轉過來,但是后面調整高度和寬度總是調整不好~~~~~有沒有其他強制橫屏的更好的辦法呢?~~~
- 1 回答
- 0 關注
- 1471 瀏覽
添加回答
舉報
0/150
提交
取消