为什么Chrome在最小化窗口的情况下无法正确显示网页



我正在尝试构建自定义视频控件。

这是我的代码:

<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<style>
video {
transform: scale(-1, 1);
object-fit: cover;
}
</style>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</head>
<body class="p-1">
<div class="border-top border-primary container-fluid">
<div class="h-25 row">
<div class="border-left border-bottom border-primary col-6 d-flex flex-column p-1" style="box-sizing:border-box">
<div class="bg-primary h-75 text-white">
sdfsfd
</div>
<div class="bg-secondary h-25 text-danger">
9080
</div>
</div>
<div class="border-left border-bottom border-right border-primary col-6 d-flex flex-column p-1">
<video id="remoteView" autoplay muted>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</video>
</div>
</div>
<div class="row">
<div class="align-items-center border-left border-bottom border-right border-primary col-12 d-flex flex-row justify-content-center p-0">
<div class="btn-group-toggle d-flex justify-content-center p-1">
<button class="btn-sm btn btn-lg btn-success">A</button>
</div>
<div class="btn-group-toggle d-flex justify-content-center p-1">
<button class="btn-sm btn btn-lg btn-success">B</button>
</div>
<div class="btn-group-toggle d-flex justify-content-center p-1">
<button class="btn-sm btn btn-lg btn-success">C</button>
</div>
</div>  
</div>
</div>
</body>
</html>

当Chrome浏览器窗口最小化时,左上角的单元格无法正确显示。

然而,在Firefox浏览器中,问题并不存在。

我该怎么修?

video { height: 100vh; min-height: 100%; }

您可以通过以下How to - Fullscreen Video获得有关视频全屏的更多详细信息

尝试按Ctrl+Shift+R

最新更新