如何解决全屏模式下的手机屏幕旋转按钮
当用户按下按钮时,屏幕从垂直变为水平,当您从全屏模式点击退出按钮时,它从水平返回垂直Example
var elem = document.documentElement;
function openFullscreen() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) { /* Safari */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE11 */
elem.msRequestFullscreen();
}
}
function closeFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) { /* Safari */
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) { /* IE11 */
document.msExitFullscreen();
}
}
<button onclick="openFullscreen();">Open Fullscreen</button>
<button onclick="closeFullscreen();">Close Fullscreen</button>
解决方法
.post ul li:nth-of-type(12){
background-color: #9FA4C4;
}
.post ul li:nth-of-type(13) {
background: #B3CDD1 ;
}
.post ul li:nth-of-type(14) {
background: #9E768F ;
}
.post ul li:nth-of-type(15) {
background: #9FA4C4 ;
}
.post ul li:nth-of-type(16) {
background: #B279A7 ;
}
.post ul li:nth-of-type(17) {
background: #D387AB ;
}
.post ul li:nth-of-type(18) {
background: #864BA2 ;
}
.post ul li:nth-of-type(21) {
background: #BF3A30 ;
}
.post ul li:nth-of-type(10) {
background: #6E45E1 ;
}
.post ul li:nth-of-type(11) {
background: #89D4CF ;
}
.post ul li:nth-of-type(2) {
background: #A7ACD9 ;
}
.post ul li:nth-of-type(3) {
background: #9E8FB2;
}
.post ul li:nth-of-type(4) {
background: #A88BEB ;
}
.post ul li:nth-of-type(5) {
background: #F8CEEC ;
}
.post ul li:nth-of-type(6) {
background: #B58ECC ;
}
.post ul li:nth-of-type(7) {
background: #5DE6DE ;
}
.post ul li:nth-of-type(8) {
background: #647DEE ;
}
.post ul li:nth-of-type(9) {
background: #7F53AC ;
}
.post ul li:nth-of-type(19) {
background: #77EED8 ;
}
.post ul li:nth-of-type(20) {
background: #9EABE4 ;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。