我使用的是HTML CSS和Bootstrap 4,我不知道如何修复它,但它出现在底部的幻灯片

vjhs03f7  于 2023-09-28  发布在  Bootstrap
关注(0)|答案(1)|浏览(88)

html和bootstrap:

// Extra small devices (portrait phones, less than 576px)
// No media query since this is the default in Bootstrap

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }



.jumbotron--aboutus {

    background-image: url(ContraMedia-Free-Zoom-Bg-49.jpg);
    background-size: cover;
    background-position: left 40% bottom 18%; 
    height: 50vh;
    filter: brightness(90%);
    margin-bottom: 100px;
}

.jumbotron--play {
    background-image: url(bed123.jpg);
    background-size: cover;
    background-position: center;
    height: 50vh;
    width: 75%;
    margin-top: 100px;
    margin-left: 12%;
}

.jumbotron h1 {
    text-align: center;
    color: white;
    margin-top: 130px;
    filter: brightness(200%);
    font-size: 40px;
    font-weight: bold;
}


.row .col {
    left: -10%;
    margin: 10px;
    margin-bottom: 50px;
}

.row .col-lg {
    justify-content: center;
    top: 100px;
    left: 20px;
}

.row .col-lg h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.row .col-lg-7 {
    left: 160px;
}

.zoom-image {
    transition: transform 0.3s ease;
}

.zoom-image:hover {
    transform: scale(1.05);
}

  .container h2 {
    font-size: 27px;
  }

  
  .container p {
    margin-bottom: 30px;
    font-size: 14px;
    color: grey;
  }

  .container button {
    background-color: white;
    border: 0.1px black solid;
    width: 140px;
    height: 45px;
    transition: background-color 0.5s;
  }

  .container button:hover {
    background-color: #ED5D43;
    cursor: pointer;
    color: white;
    border: none;
  }
.jumbotron button {
    margin-left: 48%;
    margin-top: 10%;
    border-radius: 50%;
    background: none;
    border: 1px white solid;
    color: white;
    font-size: 16px;
    padding: 30px;
    transition: transform 0.3s ease;
    outline: none;
}

.jumbotron button:hover {
    background-color: none;
    cursor: pointer;
    transform: scale(1.05);
    outline: none;
}

.row .col-md-auto {
    margin: 65px;
    transition: transform 0.3s ease;
    opacity: 0.5;
}
.row .col-md-auto:hover {
    transform: scale(1.1);
    cursor: pointer;
    opacity: 1;
}

.jumbotron--email {
    background-image: url(back-2.jpg);
    background-size: cover;
    background-position: center center;
    padding: 65px 0 70px 0px;
    height: 300px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.jumbotron--email h1 {
    text-align: center;
    color: black;
    margin-top: -1%;
    margin-bottom: 20px;
}
.jumbotron--email p {
    text-align: center;
    justify-content: center;
    color: grey;
    font-size: 15px;
}

.jumbotron--email .email input[type=email] {
    width: 235%;
    border: none;
    border-bottom: 1.5px solid #e5e5e5;
    padding: 5px 6px;
    height: 40px;
    background: transparent;
    border-radius: 0;
    outline: none;
    margin-left: -70%;
}

.jumbotron--email  .button-arrow {
    color: black;
    border: none;
    margin-left: 100%;
    border-radius: 0;
    font-size: 20px;
    z-index: 1;
    position: absolute;
    top: -140%;
    transition: transform 0.3s ease;
    outline: none;
}

.jumbotron--email  .button-arrow:hover {
    outline: none;
    transform: scale(1.1);
}

.jumbotron--email .email {
    position: relative;
    width: 17%;
  }
<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <link rel="stylesheet" href="bootstrap.css">
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />

    <title>About Us</title>
  </head>

    <div class="jumbotron jumbotron--aboutus">
      <h1 class="display-4">ABOUT US</h1>
    </div>

    <div class="container">
        <div class="row">
            <div class="col col-lg-8">
                <a href="#">
                    <img src="presidents-day-furniture-amazon-tout-b05768db6945443b9a2190e5b099a777.webp" class="img-fluid zoom-image" alt="Image 1">
                </a>
            </div>
    
            <div class="col col-lg">
                <h2 class="display-6">Modular Sofa, Light Gray Linen</h2>
                <p>Modern sectional sofa with an inverted L-shaped seat that can be placed on either side,…</p>
                <button>Shop Now</button>
            </div>
        </div>
    
        <div class="row">
            <div class="col col-lg">
                <h2 class="display-6">Bedside Cabinet, Oak Material</h2>
                <p>Store gadgets, books, or magazines on this easy-sliding two-tier nightstand or end table.</p>
                <button>Shop Now</button>
            </div>
    
            <div class="col col-lg-7">
                <a href="#">
                    <img src="tabdaugiuong-2.jpg" class="img-fluid zoom-image" alt="Image 2">
                </a>
            </div>
        </div>
    </div>

    <div class="jumbotron jumbotron--play mx-auto">
        <button> Play</button>
    </div>
    
    <div class="row justify-content-md-center">
        <div class="col-md-auto">
          <a href="">
            <img src="brand.jpg" alt="">
          </a>
        </div>
        <div class="col-md-auto">
          <a href="">
            <img src="brand-2.jpg" alt="">
          </a>
        </div>

        <div class="col-md-auto">
            <a href="">
              <img src="brand-3.jpg" alt="">
            </a>
          </div>

          <div class="col-md-auto">
            <a href="">
              <img src="brand-5.jpg" alt="">
            </a>
          </div>

          <div class="col-md-auto">
            <a href="">
              <img src="brand-4.jpg" alt="">
            </a>
          </div>

      </div>

      <div class="jumbotron jumbotron--email">
        <h1 class="display-4">Our Newsletter</h1>
        <p class="lead">Enjoy our newsletter to stay updated with the latest news!</p>
        <form action="" class="email">
          <div class="input-container">
            <input aria-required="true" aria-invalid="false" placeholder="Your email..." value="" type="email" name="your-email" required>
            <button type="submit" class="button-arrow">
              <i class="fa-solid fa-arrow-right"></i>
            </button>
          </div>
        </form>
      </div>
      
    
      

    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  </body>
</html>

我试图删除大屏幕-播放,但它不工作。最后是类行justify-content-md-center影响了,但我不知道如何修复它。

kx1ctssn

kx1ctssn1#

<div class="container-fluid">
  <div class="row justify-content-md-center">
    <div class="col-md-auto">
      <a href="">
        <img src="brand.jpg" alt="">
      </a>
    </div>
    <div class="col-md-auto">
      <a href="">
        <img src="brand-2.jpg" alt="">
      </a>
    </div>

    <div class="col-md-auto">
        <a href="">
          <img src="brand-3.jpg" alt="">
        </a>
      </div>

      <div class="col-md-auto">
        <a href="">
          <img src="brand-5.jpg" alt="">
        </a>
      </div>

      <div class="col-md-auto">
        <a href="">
          <img src="brand-4.jpg" alt="">
        </a>
      </div>

  </div>

部分“row justify-content-md-center”需要在容器流体内部,以便占据100%的屏幕宽度。把它想象成一个盒子,你必须用'container'或'container-fluid'指定区域,然后放置你的元素。

相关问题