Php 导航未显示在我的视频集顶部作为背景
所以在我的网站上,我有一个视频作为背景,我把所有的东西放在视频下面,但是上面的东西都不会显示出来 index.phpPhp 导航未显示在我的视频集顶部作为背景,php,html,css,styles,Php,Html,Css,Styles,所以在我的网站上,我有一个视频作为背景,我把所有的东西放在视频下面,但是上面的东西都不会显示出来 index.php <link rel="stylesheet" href="css/index.css"> <body> <div class="navigation"> <a href="blog.php">Updates</a> <a href="#">|</a>
<link rel="stylesheet" href="css/index.css">
<body>
<div class="navigation">
<a href="blog.php">Updates</a>
<a href="#">|</a>
<a href="blog.php">Start</a>
<a href="#">|</a>
<a href="blog.php">Login</a>
</div>
<video autoplay muted loop id="background_video">
<source src="assets/backgrounds/index_background.mp4" type="video/mp4">
</video>
问题在于z指数。 “.navigation”类的z索引必须大于/高于ID为“#background_video”的视频元素的z索引
在.navigation类中不能使用两个“位置”。“绝对”被“固定”覆盖了。你试过设置z-index吗???@collinger是的,我有,但不幸的是你不能设置z-index:-1xd(或者你能吗?@collinger好的,现在解决了,你可以将z-index设置为负数xD
.navigation{
position: absolute;
color: white;
z-index: auto;
float: none;
list-style-type: none;
background-color: white;
position: fixed;
}
#background_video{
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 50%;
z-index: 0;
}