【发布时间】:2021-01-01 02:58:57
【问题描述】:
我只想知道如何使视频标签与窗口高度相同。 这是我的 html 文件中的内容
<!DOCTYPE html>
<html lang="en">
<head>
<script src="./app.js" defer></script>
<link rel="stylesheet" href="./style.css">
<title>Document</title>
</head>
<body>
<video src="example video.mp4" id="video1">
</body>
</html>
这是我的 css 文件中的内容
* {
padding: 0px;
margin: 0px;
}
body {
justify-content: center;
align-content: center;
text-align: center;
}
#video1 {
}
【问题讨论】:
-
你可以使用:
height: 100vh -
@MinalChauhan 在底部有一个很小的区域,只是白色的,有什么办法可以解决这个问题吗?