나는 말도 안되는 말을하지 않을 것입니다. 나는 당신에게 코드를 게시 할 것입니다
특정 코드는 다음과 같습니다.
<! doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title> 문서 </title> </head> <script src = "http://libs.baidu.com/jquery/1.9.0/jquery.js"> <script> <script> screenorientationEvent () {if (Orientation == 0) {document.getElementById ( "change"). value = "value ="vertic "; $ ("body "). css ({ 'transform': 'rotate (90deg)', '-webkit-transform': 'rotate (90deg)', '-Moz-Transform': 'rotate (90deg)';} el se {document.getElementById ( "change"). value = "수평"; $ ( "body"). css ({ 'transform': 'rotate (0deg)', '-webkit-transform': 'rotate (0deg)', '-moz-transform': 'rotate (0deg)');} var innerwidthtmp = wind 이벤트 screenorientationEvent (); innerwidthtmp = iw;}} catch (e) {alert (e);}; // 간격 고정 이벤트가 화면이 회전하는지 여부, 기본 500ms settimeout ( "screenorientationListener ()", 500);} // 시동 시작 ScreenorientationListener (); </script> </script> </script> onload = "screenorientationEvent ()"> <input id = "change"type = "text"value = ""/> </body> </html>위의 JS 코드는 모바일에서 수평 화면을 구현하기위한 핵심 코드입니다. 코드는 간단하고 이해하기 쉽습니다. 나는 당신에게 너무 많은 의견을 첨부하지 않았습니다. 아무것도 이해하지 못하면 메시지를 남겨주세요. 편집자는 제 시간에 귀하에게 답장을 드릴 것입니다. Wulin Network 웹 사이트를 지원해 주셔서 대단히 감사합니다!