第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

修復(fù)了窗口調(diào)整大小時(shí)帶有側(cè)邊欄位置的導(dǎo)航欄

修復(fù)了窗口調(diào)整大小時(shí)帶有側(cè)邊欄位置的導(dǎo)航欄

慕慕森 2021-06-29 11:59:09
我目前正在開發(fā)一個(gè)帶有導(dǎo)航欄和側(cè)邊欄的網(wǎng)頁。我的導(dǎo)航欄包含我的頁面的類別,即汽車和摩托車。單擊后,側(cè)邊欄將顯示其中包含所選類別的庫和參考。但是,每當(dāng)窗口調(diào)整大小時(shí),我的頁面都會(huì)丟失其格式。側(cè)邊欄是固定的,但它可以滾動(dòng),看起來它與導(dǎo)航欄斷開連接。如何使他們的位置固定?.navbar-inverse {  background: black;  font-size: 18px;}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus {  color: #ffb143;}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus {  color: white;  font-size: 18px;}.navbar-brand {  font-family: 'Lato', sans-serif;  color: grey;  font-size: 20px !important;  margin: 0px;}td {  font-weight: normal;  padding-left: 55px;  padding-right: 10px;  padding-bottom: 18px;  text-align: center;}th {  font-weight: bold;  padding-left: 65px;  padding-right: 50px;  overflow: hidden;  white-space: nowrap;  text-align: center;}table#bod {  width: 100%;  margin-left: 15px;  margin-right: 45%;}#add {  margin-left: 10px;  width: 50px;}.sidebar {  height: 100%;  width: 200px;  position: fixed;  z-index: 1;  top: 0;  left: 0;  background-color: black;  overflow-x: hidden;  padding-top: 80px;  margin-top: 45px;}/* Style sidebar links */.sidebar a {  padding: 6px 8px 6px 16px;  text-decoration: none;  font-size: 18px;  color: white;  display: block;}/* Style links on mouse-over */.sidebar a:hover {  color: #f1f1f1;}/* Style the main content */.main {  margin-left: 160px;  /* Same as the width of the sidenav */  padding: 0px 10px;}/* Add media queries for small screens (when the height of the screen is less than 450px, add a smaller padding and font-size) */@media screen and (max-height: 450px) {  .sidebar {    padding-top: 15px;  }  .sidebar a {    font-size: 18px;  }}
查看完整描述

2 回答

?
紅顏莎娜

TA貢獻(xiàn)1842條經(jīng)驗(yàn) 獲得超13個(gè)贊

如果我理解你的問題......那么我只是減少了側(cè)邊欄的 Z-index 并將所有元素的框大小設(shè)置為邊框框,并將正文的邊距和填充設(shè)置為 0


/* added this */

*{

padding : 0;

margin : 0;

box-sizing : border-box;

}

.navbar-inverse {

  background: black;

  font-size: 18px;

}


.navbar-inverse .navbar-nav>li>a:hover,

.navbar-inverse .navbar-nav>li>a:focus {

  color: #ffb143;

}


.navbar-inverse .navbar-brand:hover,

.navbar-inverse .navbar-brand:focus {

  color: white;

  font-size: 18px;

}


.navbar-brand {

  font-family: 'Lato', sans-serif;

  color: grey;

  font-size: 20px !important;

  margin: 0px;

}


td {

  font-weight: normal;

  padding-left: 55px;

  padding-right: 10px;

  padding-bottom: 18px;

  text-align: center;

}


th {

  font-weight: bold;

  padding-left: 65px;

  padding-right: 50px;

  overflow: hidden;

  white-space: nowrap;

  text-align: center;

}


table#bod {

  width: 100%;

  margin-left: 15px;

  margin-right: 45%;

}


#add {

  margin-left: 10px;

  width: 50px;

}


.sidebar {

  height: 100%;

  width: 200px;

  position: fixed;

  z-index: -1;

  top: 0;

  left: 0;

  background-color: black;

  overflow-x: hidden;

  padding-top: 80px;

  margin-top: 45px;

}



/* Style sidebar links */


.sidebar a {

  padding: 6px 8px 6px 16px;

  text-decoration: none;

  font-size: 18px;

  color: white;

  display: block;

}



/* Style links on mouse-over */


.sidebar a:hover {

  color: #f1f1f1;

}



/* Style the main content */


.main {

  margin-left: 160px;

  /* Same as the width of the sidenav */

  padding: 0px 10px;

}



/* Add media queries for small screens (when the height of the screen is less than 450px, add a smaller padding and font-size) */


@media screen and (max-height: 450px) {

  .sidebar {

    padding-top: 15px;

  }

  .sidebar a {

    font-size: 18px;

  }

}

<nav class="navbar navbar-inverse" nav id="nav_bar">

  <div class="container-fluid">

    <div class="navbar-header">

      <a class="navbar-brand" href="index.php"> MRB Data Library </a>

    </div>

    <ul class="nav navbar-nav">

      <li class="active"><a href="#" style=>Cars</a></li>

      <li class="active"><a href="#">||</a></li>

      <li class="active"><a href="#">Motorcycle</a></li>

    </ul>

  </div>


</nav>



<form action="slider_update.php" method="POST">

  <div class="sidebar">

    <center>

      <h2 style="color: white">LIBRARY</h2>

    </center>

    <a href="index.php"><i class="fa fa-fw fa-home"></i> Home</a>

    <a href="#.php"><i class="fa fa-fw fa-folder"></i> Reference</a>

    </nav>

  </div>


查看完整回答
反對(duì) 回復(fù) 2021-07-01
  • 2 回答
  • 0 關(guān)注
  • 153 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)