gpt4 book ai didi

html - 背景视频推到父 div 之外

转载 作者:太空宇宙 更新时间:2023-11-04 07:14:31 24 4
gpt4 key购买 nike

在特定窗口宽度(大约 1100px)下遇到问题我网站标题页的背景视频开始出现问题。很难解释,但是在第一个 div (titlecontainer) 和下面的 (aboutcontainer) 之间出现了莫名其妙的差距。测试服务器地址为:mintrain。有限公司英国

任何帮助都会很棒。我已经阅读了关于模拟背景大小:html5 视频的封面,但它没有解决 div 高度有限的问题。谢谢, jack

最佳答案

与其让位置是绝对的,不如让位置固定。这应该可以解决您的尺码问题!

#bgvideo {
position: fixed;
transform: translate(-50%,-50%);
background-color: #232528;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
top: 50%;
left: 50%;
}

@media only screen and (max-width: 1000px) {
#bgvideo {
position: absolute;
transform: translate(-50%,-50%);
background-color: #232528;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
top: 50%;
left: 50%;
} }

关于html - 背景视频推到父 div 之外,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50847483/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com