首頁 > web前端 > H5教程 > 主體

html5怎麼禁止橫屏

藏色散人
發布: 2021-04-12 10:03:05
原創
9499 人瀏覽過

html5禁止橫屏的方法:先開啟對應的HTML5程式碼檔案;然後在head區域中加入「<meta name="screen-orientation" content="portrait">」即可禁止html5頁面橫屏。

html5怎麼禁止橫屏

本文操作環境:windows7系統、HTML5&&CSS3版、Dell G3電腦。

禁止手機端html5頁橫屏

禁止手機端html5頁橫屏,uc瀏覽器和qq瀏覽器禁止橫屏代碼如下,meta標籤加入head區域&lt ;meta name="screen-orientation" content="portrait">

# uc瀏覽器強制垂直螢幕

<meta name="screen-orientation" content="portrait">
登入後複製

 QQ瀏覽器強制垂直螢幕

<meta name="x5-orientation" content="portrait">
登入後複製

 UC瀏覽器強制全螢幕

<meta name="full-screen" content="yes">
登入後複製

 QQ瀏覽器強制全螢幕

<meta name="x5-fullscreen" content="true">
登入後複製

 UC瀏覽器應用模式

<meta name="browsermode" content="application">
登入後複製

 QQ瀏覽器應用模式

<meta name="x5-page-mode" content="app">
登入後複製

 windows phone 點選無高光

<meta name="msapplication-tap-highlight" content="no">
登入後複製

【推薦學習:HTML5影片教學

以上是html5怎麼禁止橫屏的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!