Задать вопрос
@HacerPC

Как сделать так, чтобы после контейнера было видно другой контейнер(Первый контейнер закрывает другие после себя)?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>****** *** ****</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="./style.css">
    <style>
      .col-5 {
        background-color: #ff0000;
        padding: 10px;
        position: fixed;
        left: 0;
        width: 100%;
        height: 600px;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: right;
        padding-right: 20px;
        color: white;
        overflow: hidden;
        background: linear-gradient(to left, rgba(255, 255, 255, 1), transparent), url('https://i.ibb.co/YB2gnq4/0-02-05-8336106d7896142dcd5dce25e980d501a384b331ba840170c1ad530f2ea7482d-73bca484d79b1e3b.jpg');
        background-size: 57% auto;
        background-position: -100px center;
        background-repeat: no-repeat;
      }

      .col-5::before {
        content: "";
        margin-left: 3%;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgb(255, 255, 255);
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 5%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 1) 95%);
        z-index: -1;
      }

      .col-5 h3 {
        top: 30px;
        margin: 0;
        color: rgb(0, 0, 0);
        text-align: right;
        position: absolute;
        top: 50%;
        right: 20%;
        transform: translateY(-50%);
        text-align: right;
        padding-left: 50%;
        margin-bottom: 10%;
      }

      .col-5 h4 {
        margin-top: 10px;
        color: rgb(0, 0, 0);
        text-align: right;
        position: absolute;
        top: 75%;
        right: 20%;
        transform: translateY(-50%);
        text-align: right;
        padding-left: 50%;
      }
    </style>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
      <div class="container">
        <a class="navbar-brand" href="#">****** **</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link active" aria-current="page" href="#">*** ***</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" aria-current="page" href="#">*****</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" aria-current="page" href="#">*****</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" aria-current="page" href="#">******</a>
            </li> 
            <li class="nav-item">
              <a class="nav-link" aria-current="page" href="#">******</a>
            </li> 
          </ul>
          <span class="text-light mx-auto">
            *********
          </span>
          <span class="navbar-text mx-auto">
            <a href="mailto:*************************">**********************</a>
          </span>
        </div>          
      </div>
    </nav>
    <div class="container">
      <div class="row">
        <div class="col-md-6">
          <div class="col-5">
            <div class="card border-0 shadow-sm p-3 mb-5 bg-white rounded" style="width: 25rem; margin-left: 50%;">
              <div class="card-body">
                <h5 class="card-title">********* ** ***** *** <p style="margin-top: -1rem;"></p> ** * *** **** * *********** ** ***********</h5>
                <p class="card-text">************</p>
                <a href="#" class="btn btn-dark">*********</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
  </body>
</html>
  • Вопрос задан
  • 53 просмотра
Подписаться 1 Средний 4 комментария
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы