VueJS PWA上所有浏览器的锁定方向(纵向)

问题描述 投票:0回答:1

我正在尝试获取屏幕锁定以使其适用于我的Web应用程序。我一直在搜索论坛,但找不到解决此问题的方法。

有人知道我该如何解决这个问题?

vue.js orientation progressive-web-apps screen-orientation
1个回答
0
投票

我使用scss媒体查询来解决此问题。

@media screen and (min-aspect-ratio: 13/9) {
  html {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
  }
  .bw-dashboard {
    height: inherit;
  }
}
@media screen and (min-width: 1292px) {
  html {
    transform: none;
    transform-origin: none;
    width: 100%;
    overflow-x: none;
    position: relative;
  }
  .bw-dashboard {
    height: 100vh;
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.