久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

CSS 下拉導(dǎo)航

CSS drop down navigation(CSS 下拉導(dǎo)航)
本文介紹了CSS 下拉導(dǎo)航的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我確定這是我缺少的一些簡(jiǎn)單的東西...我的下拉菜單正在主導(dǎo)航中打開,并擴(kuò)大了它.這是我正在處理的頁(yè)面的鏈接.問(wèn)題在于應(yīng)用按鈕下方的導(dǎo)航.

I'm sure this is something simple I'm missing... My drop down menu is opening within the main navigation, widening it. Here is a link to the page I'm working on. The issue is with the navigation below the App buttons.

http://membershq.incentiveusa.com/AwardPages/GoalUp_Test2/index_test3.html#

這是我的 HTML:

 <div class="container-fluid">
         <div class="section-title2 text-center">        
                <div class="navigation">
                    <label for="show-menu" class="show-menu">Show Menu</label>
<input type="checkbox" id="show-menu" role="button">
<ul >
    <li><a href="#">About Us</a>
    <ul>
    <li><a href="about.html">Who We Are</a></li>
    <li><a href="news.html">News</a></li>
    </ul></li>
    <li><a href="HowItWorks.html">How It Works</a></li>
    <li><a href="FactsStats.html">Facts</a></li>
    <li><a href="ParentingTools.html">Tools</a></li>
    <li><a href="testimonials.html">Testimonials</a></li>
    <li><a href="news.html">News</a></li>
    <li><a href="awards.html">Brand Name Awards</a></li>
    <li><a href="contact.html">Contact</a></li>
</ul>

這是 CSS:

.navigation{
margin-right: auto;
margin-left: auto;
width: 100%;
background-color: #0f9cde;
position: absolute;
display: block;
margin-bottom: 15px;
z-index: 1000;
top: 735px;
margin-left: -15px;
}
/*Strip the ul of padding and list styling*/
.navigation ul{
list-style-type: none;
margin: 0 auto;
padding: 0;
position: relative;
z-index: 10000;
text-align:center;
}

/*Create a horizontal list with spacing*/
.navigation li{
display:inline-block;
margin-right: 0px;
background-color:#0f9bde;

}

/*Style for menu links*/
.navigation li a {

min-width: 189px;
height: 50px;
text-align: center;
line-height: 50px;
font-family: 'Maven Pro', sans-serif;
font-size:18px;
color: #fff;
width:100%;
background-color: #0f9cde;
text-decoration: none;
display:block;

}

/*Hover state for top level links*/
.navigation li:hover a {
color: #f7a800;
text-decoration: underline;
}

/*Style for dropdown links*/
.navigation li:hover ul a {
background: #f7a800;
color: #ffffff;
height: 40px;
line-height: 40px;
z-index: 10001;
}

/*Hover state for dropdown links*/
.navigation li:hover ul a:hover {
background: #fff;
color: #f7a800;
}

/*Hide dropdown links until they are needed*/
.navigation li ul{
display: none;
z-index: 10001;
}

/*Make dropdown links vertical*/
.navigation li ul li {
display: block;
float: none;
}

/*Prevent text wrapping*/
.navigation li ul li a {
width: auto;
min-width: 100px;
padding: 0 20px;
}

.navigation ul li:hover ul{
display:block;
}

/*Display the dropdown on hover*/
navigation ul li a:hover  {
display: block;

}

推薦答案

你要給選擇器添加一個(gè) position:absolute .navigation li ul

You have to add a position:absolute to the selector .navigation li ul

.navigation{
margin-right: auto;
margin-left: auto;
width: 100%;
background-color: #0f9cde;
position: absolute;
display: block;
margin-bottom: 15px;
z-index: 1000;
margin-left: -15px;
}
/*Strip the ul of padding and list styling*/
.navigation ul{
list-style-type: none;
margin: 0 auto;
padding: 0;
position: relative;
z-index: 10000;
text-align:center;
}

/*Create a horizontal list with spacing*/
.navigation li{
display:inline-block;
margin-right: 0px;
background-color:#0f9bde;

}

/*Style for menu links*/
.navigation li a {

min-width: 189px;
height: 50px;
text-align: center;
line-height: 50px;
font-family: 'Maven Pro', sans-serif;
font-size:18px;
color: #fff;
width:100%;
background-color: #0f9cde;
text-decoration: none;
display:block;

}

/*Hover state for top level links*/
.navigation li:hover a {
color: #f7a800;
text-decoration: underline;
}

/*Style for dropdown links*/
.navigation li:hover ul a {
background: #f7a800;
color: #ffffff;
height: 40px;  
line-height: 40px;
z-index: 10001;
}

/*Hover state for dropdown links*/
.navigation li:hover ul a:hover {
background: #fff;
color: #f7a800;
}

/*Hide dropdown links until they are needed*/
.navigation li ul{
display: none;
z-index: 10001;
  
  position: absolute;
}

/*Make dropdown links vertical*/
.navigation li ul li {
display: block;
float: none;
}

/*Prevent text wrapping*/
.navigation li ul li a {
width: auto;
min-width: 100px;
padding: 0 20px;
}

.navigation ul li:hover ul{
display:block;
}

/*Display the dropdown on hover*/
navigation ul li a:hover  {
display: block;

}

<div class="container-fluid">
         <div class="section-title2 text-center">        
                <div class="navigation">
<ul >
    <li><a href="#">About Us</a>
    <ul>
    <li><a href="about.html">Who We Are</a></li>
    <li><a href="news.html">News</a></li>
    </ul></li>
    <li><a href="HowItWorks.html">How It Works</a></li>
    <li><a href="FactsStats.html">Facts</a></li>
    <li><a href="ParentingTools.html">Tools</a></li>
    <li><a href="testimonials.html">Testimonials</a></li>
    <li><a href="news.html">News</a></li>
    <li><a href="awards.html">Brand Name Awards</a></li>
    <li><a href="contact.html">Contact</a></li>
</ul>
                  </div></div></div>

這篇關(guān)于CSS 下拉導(dǎo)航的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to check for duplicate CSS rules?(如何檢查重復(fù)的 CSS 規(guī)則?)
Remove duplicate CSS declarations across multiple files(刪除多個(gè)文件中的重復(fù) CSS 聲明)
How can I duplicate a div onclick event?(如何復(fù)制 div onclick 事件?)
opening html from google drive(從谷歌驅(qū)動(dòng)器打開 html)
How to embed videos from Google drive to webpage?(如何將視頻從 Google 驅(qū)動(dòng)器嵌入到網(wǎng)頁(yè)?)
How to view Google drive pdf link in iframe(如何在 iframe 中查看 Google Drive pdf 鏈接)
主站蜘蛛池模板: 91精品国产一区二区三区 | 欧美视频精品 | 中国一级特黄视频 | 久久一及片 | 亚洲综合国产 | 国产东北一级毛片 | 国产精品久久午夜夜伦鲁鲁 | 特级毛片爽www免费版 | 欧美一区二区综合 | 亚洲福利视频一区二区 | 一区二区视频免费观看 | 岛国av免费看 | 亚洲欧美日韩在线 | 欧美一区永久视频免费观看 | 日韩精彩视频 | 日本黄色一级片视频 | 国产有码 | 在线国产一区二区三区 | 午夜视频在线免费观看 | 日本在线视 | 欧美激情久久久 | 久久精品亚洲精品国产欧美 | 日韩精品一区二区三区久久 | 日韩精品一区二区三区中文字幕 | 欧美一区二区三区在线 | 日韩男人天堂 | 一区二区三区视频在线 | 免费观看av网站 | 日韩在线视频免费观看 | 亚洲视频免费在线观看 | 亚洲一区二区视频 | 黄色网毛片| 天堂一区二区三区四区 | 欧美日韩淫片 | 亚洲高清视频一区 | 国产一级一级毛片 | 欧州一区二区 | 欧美精品久久一区 | 亚洲精品免费在线观看 | 操人网站| 久久精品1 |