PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

html5怎么禁止横屏

藏色散人
藏色散人 原创
2021-04-12 10:02:39 9266浏览

html5禁止横屏的方法:首先打开相应的html5代码文件;然后在head区域中添加“<meta name="screen-orientation" content="portrait">”即可禁止html5页面横屏。

本文操作环境:windows7系统、HTML5&&CSS3版、Dell G3电脑。

禁止手机端html5页面横屏

禁止手机端html5页面横屏,uc浏览器和qq浏览器禁止横屏代码如下,meta标签添加到head区域<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视频教程

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。