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

試圖為我的網站創建等寬的topnav,包括按鈕和can & # 39我似乎不知道如何讓它們和鏈接一樣寬

李中冰2年前7瀏覽0評論

我已經嘗試將dropbtn包含到width屬性中,但似乎無法正常工作,只是在尋求建議,所以我想將這兩個按鈕命名為& quot產品& quot和& quot服務& quot使兩者的寬度與鏈環的寬度相等。謝謝

在此輸入圖像描述

超文本標記語言

<div class="topnav" id="myTopnav">
              <a href="/index.html">Home</a>
              <div class="dropdown">
                <button class="dropbtn">Products</button>
                <div class="dropdown-content">
                    <a href="/product.html">ALL PRODUCTS</a>
                </div>
              </div>
              <div class="dropdown">
                <button class="dropbtn">Services</button>
                <div class="dropdown-content">
                    <a href="/services.html">All Services</a>
                </div>
              </div>
              <a href="/contact.html">Contact</a>
              <a href="/about.html">About</a>
              <a href="#">Customer Login</a>
              <a href="javascript:void(0);" style="font-size:15px;" class="icon" onclick="myFunction()">&#9776;</a>
            </div>

<script>

function myFunction() {
  var x = document.getElementById("myTopnav");
  if (x.className === "topnav") {
    x.className += " responsive";
  } else {
    x.className = "topnav";
  }
}

</script>

半鑄鋼?鋼性鑄鐵(Cast Semi-Steel)

.topnav {
  width: 84%;
  overflow: hidden;
  background-color: #706f6f;
  margin: auto;
}

.topnav a {
  float: left;
  display: block;
  color: #ffffff;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  width: 14%;
}

.topnav .icon {
  display: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.topnav .dropbtn {
    width: 14%;
}

.dropdown .dropbtn {
  font-size: 17px;    
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  float: none;
  color: #706f6f;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.topnav a:hover, .dropdown:hover .dropbtn {
  background-color: #2d2e83;
  color: #ffffff;
  transition: .5s;
}

.dropdown-content a:hover {
  background-color: #2d2e83;
  color: #ffffff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

@media screen and (max-width: 600px) {
  .topnav a:not(:first-child), .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 600px) {
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
  .dropdown-content{
      display: none;
    }
}

所以我希望導航條的所有部分寬度相等。