gpt4 book ai didi

html - 将 html 页面中的所有内容向下移动而不更改视频的位置

转载 作者:行者123 更新时间:2023-11-28 00:42:19 26 4
gpt4 key购买 nike

我创建了一个页面,整个页面上都有一个带有设计的 mask ,视频在 mask /设计中播放。我想让它顶部有更多空间,并且所有内容都在页面下方 100px。当我在 .mask-wrapper 中将“top 从 50px 更改为 100px 时,这就是我想要的样子,但是我所有的视频都不在同一个地方,因为我将它们定位为“top=50px”

有没有办法将 html 页面中的所有内容都向下移动并保持相同的位置?这是页面的链接

file:///Users/kelseyselby/Desktop/%20Semester%201%202018/Web%20Design%20Basics/keke13505.github.io/FINALPROJECT/index.html

<!DOCTYPE html>
<html>
<head>

</head>
<body>


<video loop id="ocean" src="video/OCEAN_8873.mp4" type="video/mp4">
</video>
<video id="vid" src="video/IMG_8873.mp4" type="video/mp4">
</video>


<video loop id="cami" src="video/cami_8873.mp4" type="video/mp4">
</video>

<video id="night-sv" src="video/night-sv.mp4" type="video/mp4">
</video>

<div id="long">
<video id="sunsetmon" class="tik" src="video/sunsetmon.mp4" type="video/mp4"></video>
<video id="coors" class="tik" src="video/coors.mp4" type="video/mp4"></video>
</div>

<div id="main">
<video loop id="dance" class="clips" src="video/dance.mp4" type="video/mp4"></video>
<video loop id="coding" class="clips" src="video/coding.mp4" type="video/mp4"></video>
<video loop id="tony" class="clips" src="video/tony.mp4" type="video/mp4"></video>
<video loop id="fuck" class="clips" src="video/fuck.mp4" type="video/mp4"> </video>
</div>

<audio id="music" autoplay loop src="video/hello.mp3" >
<!-- <source type="audio/mp3"> -->
</audio>

<div id="pop">
<video loop id="mom" class="go" src="video/ice.mp4"></video>
<video id="SVdark" class="go" src="video/ladrone.mp4"> </video>
</div>


<div id="group">
<video loop id="laDrone" class="items" src="video/ladrone.mp4" type="video/mp4"></video>
<video loop id="snowangel" class="items" src="video/snowangel.mp4"></video>
<video loop id="clash" class="items" src="video/coding.mp4" type="video/mp4"></video>
<video loop id="flash" class="items" src="video/coding.mp4" type="video/mp4"></video>
<video loop id="milan" class="items" src="video/milan.mp4" type="video/mp4"></video>
<video loop id="ice" class="items" src="video/ice.mp4" type="video/mp4"></video>
<video loop id="amst" class="items" src="video/amst.mp4" type="video/mp4"></video>
</div>

<video loop id="jesus" src="video/jesus.mp4" type="video/mp4"> .
</video>

<div id="flow">
<video loop id="rainbow" class="drop" src="video/rainbow.mp4">
</video>
<video loop id="waterfall" class="drop" src="video/waterfall.mp4">
</video>
<video loop id="chill" class="drop" src="video/chill.mp4"> </video>
</div>



<!-- <video id="ice" src="video/ice.mp4" type="video/mp4">
</video>
-->





<div class="mask-wrapper">
<div class="mask">
<div class="hole"></div>
</div>
<div class="mask">
<div class="hole"></div>
</div>
<div class="mask">
<div class="hole"></div>
</div>
<div class="mask">
<div class="hole"></div>
</div> </div>

I actually have probably 500 of the "mask" "hole" divs to create a grid across the page


CSS
body {
margin: 0;
background-color: white: ;
background-size: 400% 400%;

}




.mask-wrapper {
width: 100vw;
height: 600px;
position: absolute;
top: 50px;
overflow: hidden;
display: flex;
flex-wrap: wrap;
justify-content: center;
}



.mask {
width: 40px;
height: 40px;
overflow: hidden;
position: relative;
border: 3px solid black;
}


.hole {
border-radius: 100px;
border: 5px solid black;
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
width: 100%;
height: 100%;
}


#vid {
position: absolute;
width: 500px;
height: 300px;
top: 42px;
left: 10px;
opacity: 0;


}



#night-sv {
position: absolute;
width: 394px;
height: 300px;
right: 10px;
top: 385px;
opacity: 0;

}

#cami {
position: absolute;
width: 364px;
top: 330px;
left: 10px;
opacity: 0;
}


#ocean {
position: absolute;
width: 1060px;
height: 700px;
right: 10px;
opacity: 0;

}

.clips{
position: relative;
flex-wrap: wrap;
flex-direction: row;
top: 502px;
left: 18px;
opacity: ;
width: 203px;
height: 200px;
margin: -10px;
opacity: 0;


}

#jesus {
position: absolute;
width: 297px;
height: 200px;
left: 513px;
top: 37px;
opacity: 0;

}

#laDrone {
position: absolute;
width: 150px;
left: 362px;
top: 52px;
opacity:0 ;
}

#snowangel {
position: absolute;
width: 150px;
left: 362px;
top: 136px;
opacity:0 ;
}

#flash {
position: absolute;
width: 80px;
right: 568px;
top: 600px;
opacity:0 ;
}

#clash {
position: absolute;
width: 80px;
right: 418px;
top: 600px;
opacity:0 ;
}

#ice {
position: absolute;
width: 80px;
right: 404px;
top: 600px;
opacity:0 ;
}

#amst {
position: absolute;
width: 80px;
right: 496px;
top: 600px;
opacity:0 ;
}

#milan {
position: absolute;
width: 80px;
right: 588px;
top: 600px;
opacity:0 ;
}


#coors {
position: absolute;
width: 211px;
right: 10px;
top: 50px;
opacity: 0;
}

#sunsetmon {
position: absolute;
width: 300px;
right: 105px;
top: 50px;
opacity:0 ;
}

#SVdark {
position: absolute;
width: 448px;
left: 362px;
top: 218px;
opacity: 0;
}

#mom {
position: absolute;
width: 263px;
right: 405px;
top: 470px;
opacity: 0;
}



#rainbow {
position: absolute;
width: 352px;
left: 10px;
top: 210px;
opacity: 0;
}

#waterfall {
position: absolute;
width: 352px;
left: 10px;
top: 50px;
opacity:0 ;
}


#chill {
position: absolute;
width: 352px;
left: 10px;
top: 374px;
opacity: 0;
}

.header body {
height: 50px;
}

最佳答案

尝试给页面上边距

body {
margin: 50px 0 0 0;
background-color: white;
background-size: 400% 400%;
}

关于html - 将 html 页面中的所有内容向下移动而不更改视频的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53745936/

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