私はあまりナンセンスとは言いません、私はあなたにコードを投稿するだけです
特定のコードは次のとおりです。
<!doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title> document> document> document> </title> </head> <script src = "http://libs.baidu.com/jquery/1.9.0/jquery.js == 0){document.getElementById( "change")。value = "vertical"; $( "body")。css({'transform': 'rotate(90deg)'、 ' - webkit-transform': 'rotate(90deg)'、 ' - moz-transform': 'rotate(90deg);} el se {document.getElementById( "change")。value = "horizontal"; $( "body")。css({'transform': 'rote': 'rote(0deg)'、 ' - webkit-transform': 'rotate(0deg)'、 '-moz-transform': 'rotate(0deg) innerwidthttmp = window.innerwidth; // horiおよび垂直画面イベントリスニング方法関数scuentorientationlistener(){var iw = window.innerwidth; //画面方向処理の変更処理を変更するif(iw!= innerwidthtmp){if(iw> window.innerheight){otering = 90; // screenorientationevent(); innerwidthtmp = iw;}} catch(e){alert(e);}; //インターバル固定イベントチェック画面がターンされているかどうか、デフォルト500ms setimeout( "screenorientationlistener()"、500);} //水平および垂直スクリーンイベントの開始screenorientationlistener() id = "change" type = "text" value = ""/> </body> </html>上記のJSコードは、モバイルに水平画面を実装するためのコアコードです。コードはシンプルで理解しやすいです。私はあなたにあまり多くのコメントを添付していません。何も理解していない場合は、私にメッセージを残してください。編集者は時間内に返信します。 Wulin Network Webサイトへのご支援ありがとうございます!