欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

html5怎么禁止横屏

程序员文章站 2022-03-11 20:53:29
...

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

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视频教程

以上就是html5怎么禁止横屏的详细内容,更多请关注其它相关文章!

相关标签: html5