这是一个页面 https://ddc7hy.blogspot.com/p/blog-page_13.html 你会看到视频没有覆盖整个页面 希望有解决办法
最佳答案
找到这段代码:
body {
margin: 0;
padding: 0;
background: #333;
background-attachment: fixed;
background-size: cover;
}
#video-background {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
}
article {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 10px solid rgba(255, 255, 255, 0.5);
margin: 10px;
}
h1 {
position: absolute;
top: 60%;
width: 100%;
font-size: 36px;
letter-spacing: 3px;
color: #fff;
font-family: Oswald, sans-serif;
text-align: center;
}
h1 span {
font-family: sans-serif;
letter-spacing: 0;
font-weight: 300;
font-size: 16px;
line-height: 24px;
}
h1 span a {
color: #fff;
}
<!DOCTYPE html>
<html>
<body>
<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<video autoplay loop id="video-background" plays-inline>
<source src="video.mp4" type="video/mp4">
</video>
</body>
</html>
关于javascript - 如何让博主其中一个页面的内容占据整个页面的框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54174474/