美文网首页
使Div全屏

使Div全屏

作者: 等级7 | 来源:发表于2022-08-10 11:10 被阅读0次
        toggleFullscreen() {
          const isFullscreen = document.webkitIsFullScreen || document.fullscreen;
          const canvas = document.getElementById(this.videoId);
          if (isFullscreen) {
            const exitFunc =
              document.exitFullscreen || document.webkitExitFullscreen;
            exitFunc.call(document);
          } else {
            const element = this.$refs.vcontainer;
            const fullscreenFunc =
              element.requestFullscreen || element.webkitRequestFullScreen;
            fullscreenFunc.call(element);
          }
        }
    

    相关文章

      网友评论

          本文标题:使Div全屏

          本文链接:https://www.haomeiwen.com/subject/sazowrtx.html