css 导航栏徽标在后台播放动画的页面上无响应

xfyts7mz  于 2023-02-10  发布在  其他
关注(0)|答案(1)|浏览(105)

我有一个导航栏内的可点击的标志。它的功能在每一页除了最后一页我的javascript测验有一个动画播放的背景。我已经改变了周围的z指数的动画和标志,但没有变化。我已经画了一个空白,它可能是什么。我敢肯定这是一些明显的,我没有看到?

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SPLANETS</title>
    <meta content="" name="description">
    <meta content="" name="keywords">
    <!-- Favicons -->
    <link href="assets/img/splanets.ico" rel="icon">
    <!-- Main Bootstrap Css-->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <!-- Main CSS File -->
    <link href="assets/css/style.css" rel="stylesheet">
    <!--Icons-->
    <script src="https://kit.fontawesome.com/128d236a07.js" crossorigin="anonymous"></script>
</head>
<body id="">
  <!-- === Header === -->
  <header>
    <nav class="navbar">
      <div class="container-fluid">
        <a class="navbar-brand mx-auto" href="index.html"><img src="assets/img/splanetslogo1.png" alt="Splanets Logo" class="img-fluid logo rocket-logo"></a>
      </div>
    </nav>
  </header>
  <!--End of Header-->
    <div class="rocket-overlay"></div>
    <video class="fullscreen-video" id="myVideo" autoplay="autoplay" muted >
        <source src="assets/img/rocketlaunch.mp4">
        Your browser does not support the video tag.
    </video>
    <section>
        <div class="card retrycard" style="width: 18rem;">
          <div class="card-body">
            <h5 class="card-title">Woohooo! Blast Off!!</h5>
            <h6 class="card-subtitle mb-2 text-muted"></h6>
            <p class="card-text">10/10! <br> Enter your name below to claim your spot on our leaderboard;
            </p>
            <a href="index.html" class="btn rewatch-btn" role="button"><i class="fa-solid fa-play"></i> Watch the video again</a>
            <br>
            <a href="game.html" class="btn replay-btn" role="button"><i class="fa-solid fa-rocket"></i> Restart Quiz</a>
          </div>
        </div>
      </section>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="/assets/js/script.js"></script>
</body>
</html>
Winner Rocket Luanch
--------------------------------*/
.fullscreen-video {
    position: fixed;
    overflow: hidden;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -3;
}

.rocket-overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}

.logo .rocket-logo {
    transform: translate(-40px);
    max-height: 130px;
    z-index: -4;
}
xlpyo6sf

xlpyo6sf1#

你应该为logo设置一个比视频和覆盖层更高的z轴。

.fullscreen-video {
    z-index: -1;
}

.rocket-overlay {
    z-index: -2;
}

.logo .rocket-logo {
    z-index: 1;
}

相关问题