欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

引導程序中的背景顏色沒有白色[關閉]

錢淋西2年前8瀏覽0評論

編輯問題,以包括預期行為、特定問題或錯誤以及重現問題所需的最短代碼。這將有助于其他人回答問題。

當您將引導程序類bg-dark添加到導航欄時,引導程序會調整所有其他元素,以使UX(即用戶體驗)盡可能達到最佳。為什么?如果你有一個深灰色的導航欄,但是下拉菜單是白色的,這兩種顏色之間有太多的對比。然而,如果你愿意,你可以在一個深灰色的導航條中設置一個白色的下拉菜單。

添加以下CSS:

.navbar-nav .dropdown-menu {
    background-color: white;
}

.navbar-nav .dropdown-item {
    color: black;
}

.navbar-nav .dropdown-divider {
    border-top: 1px solid black;
}

.navbar-nav .dropdown-item:hover {
    background-color: lightgrey;
    color: black;
}

請看下面的片段。

.navbar-nav .dropdown-menu {
  background-color: white;
}

.navbar-nav .dropdown-item {
  color: black;
}

.navbar-nav .dropdown-divider {
  border-top: 1px solid black;
}

.navbar-nav .dropdown-item:hover {
  background-color: lightgrey;
  color: black;
}

<!DOCTYPE html>
<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>Admin Dashboard</title>
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" >
  <link  rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
</head>

<body>
  <nav class="navbar navbar-expand-lg bg-dark " data-bs-theme="dark">
    <div class="container-fluid">
      <a class="navbar-brand" href="#">Navbar</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">

        <form class="d-flex ms-auto">
          <div class="input-group mb-3">
            <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2">
            <button class="btn btn-outline-secondary" type="button" id="button-addon2"><i
                                class="bi bi-search"></i></button>
          </div>
        </form>
        <ul class="navbar-nav  mb-3">

          <li class="nav-item dropdown ">
            <a class="nav-link dropdown-toggle show" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="true">
              <i class="bi bi-person-fill"></i>
            </a>
            <ul class="dropdown-menu dropdown-menu-end" data-bs-popper="static">
              <li><a class="dropdown-item " href="#">Action</a></li>
              <li><a class="dropdown-item" href="#">Another action</a></li>
              <li>
                <hr class="dropdown-divider">
              </li>
              <li><a class="dropdown-item" href="#">Something else here</a></li>
            </ul>
          </li>

        </ul>

      </div>
    </div>
  </nav>
  <ul class="navbar-nav  mb-3">

    <li class="nav-item dropdown ">
      <a class="nav-link dropdown-toggle show" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="true">
        <i class="bi bi-person-fill"></i>
      </a>
      <ul class="dropdown-menu " data-bs-popper="static">
        <li><a class="dropdown-item " href="#">Action</a></li>
        <li><a class="dropdown-item" href="#">Another action</a></li>
        <li>
          <hr class="dropdown-divider">
        </li>
        <li><a class="dropdown-item" href="#">Something else here</a></li>
      </ul>
    </li>

  </ul>

  <script src="js/bootstrap.bundle.min.js"></script>
  <script src="js/script.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
</body>

</html>