我发现代码在网上,我复制到让我的网站的标题在一个环形的背景视频。但是,我在屏幕左侧添加链接的工作无效。因为我希望每个人都堆叠在另一个之上,所以我认为flexbox是最好的处理方式,但我甚至不能在没有它的情况下显示链接。我做错了什么,达成目标的最佳方法是什么?的z-index不是文字工作过的背景视频
body {
width: 100%;
margin: 0 auto 0;
}
.video_main {
margin: 0 auto 0;
width: 100%;
height: auto;
overflow: hidden;
}
.video_main video {
/*width: 100%;*/
width: 100%px;
height: auto;
min-width: 720px;
margin: 0 auto;
z-index: -1500;
}
.content h1 {
font-family: "jaf-domus-titling-web", sans-serif;
color: white;
text-align: center;
font-size: 48px;
letter-spacing: 4px;
z-index: 100;
position: absolute;
top: 75px;
}
.content h2 {
font-family: "europa", sans-serif;
color: white;
text-align: center;
font-size: 30px;
letter-spacing: 6px;
z-index: 100;
position: absolute;
top: 175px;
}
.content p {
display: block;
font-family: "europa", sans-serif;
color: white;
text-align: center;
font-size: 16px;
z-index: 100;
position: absolute;
}
h1 {
width: 100%;
}
h2 {
width: 100%;
}
<div class="video_main">
<video width="100%" height="100%" autoplay="autoplay" loop="loop" muted="muted" preload>
<source src="http://bartonlewisfilm.com/red hook, rush hour (excerpt).mp4" type="video/mp4">
</video>
<div class="content">
<h1>Barton Lewis</h1>
<h2>films about light and the urban landscape</h2>
<p><a href="index.html" title="home">home</a></p>
<p><a href="bartons_film_site_works.html" title="works">works</a></p>
<p><a href="bartons_film_site_bio.html" title="bio">bio</a></p>
<p><a href="bartons_film_site_cv.html" title="c/v">CV</a></p>
<p><a href="bartons_film_site_contact.html" title="contact">contact</a></p>
</div>
</div>
当你说你要链接添加到屏幕的左侧,这听起来像你的意思视频旁边 - 但是你的标题是关于文本在背景视频,所以你的意思是要他们出示过视频向左下方? – FluffyKitten
是的,这是正确的,抱歉的混淆。我希望链接显示在视频上方,就像网站标题的上方和中心一样。 –