gpt4 book ai didi

html - 制作下拉菜单

转载 作者:行者123 更新时间:2023-11-28 02:47:37 25 4
gpt4 key购买 nike

您认为悬停时可以制作上下菜单吗(也许在绝对位置制作向上菜单在我看来还不够)。我想制作一个双菜单(首先在 CR 上向上和向下,然后在更多上。

我实际上做了 2 个子菜单,但我希望其中一个显示在我的标签上。

这是我的实际菜单:

@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,600,700");
body,
html {
font-family: 'Open Sans';
}

.contentwrapper {
margin-left: 0px!important;
margin-right: 0px!important;
}
nav {
position: relative;
margin-top: 0px;
padding: 0 2vw;
background: rgba(232, 227, 227, 1.05);
}

nav ul {
position: relative;
list-style: none;
margin: 0;
padding: 0;
display: inline;
}

nav>ul:last-of-type {
float: right;
}

nav ul > li > a, nav ul > li > a:focus {
background-color:rgba(232, 227, 227, 1.05);
}

nav>ul>li {
display: inline;
position: relative;
margin: 0;
padding: 0;
background-color: rgba(232, 227, 227, 1.05);
}

nav ul>li>a,
nav ul>li>a:focus {
color: #000;
font-weight: 600;
font-size: 13px;
display: table-cell;
height: 100%;
padding: 15px 20px;
text-decoration: none;
transition: all linear 0.1s;
-webkit-transition: all linear 0.1s;
-moz-transition: all linear 0.1s;
}

nav ul>li>a>span {
margin-left: 10px;
transition: all linear 0.1s;
-webkit-transition: all linear 0.1s;
-moz-transition: all linear 0.1s;
}

nav ul ul.submenu {
display: none;
position: absolute;
left: 0;
top: 100%;
list-style: none;
top: 100%;
background: rgba(232, 227, 227, 1.05);
z-index: 99;
}

nav ul ul.submenu li,
nav ul ul.submenu li a {
width: 200px;
}

nav>ul>li:hover ul.submenu {
display: inline-block;
}

nav ul>li:hover>a {
color: #fff !important;
background: #ce0000;
text-decoration: none;
}

nav ul.submenu>li:hover>a,
nav ul.submenu>li>a.active {
background: rgba(206, 0, 0, 0.8);
}
<xz xmlns="http://www.w3.org/1999/xhtml"><nav id="navbar" class="navigation">

<!-- KEEP NAV MINIFIED - NEEDED FOR LAYOUT -->

<ul>

<li><a href="/personaldetails">Action Prospection</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/SitePages/testepage.aspx">Congress management<br /> - SSM / ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/_layouts/15/guestaccess.aspx?docid=0e5a745b5adb945d08c00368b3762fc9b&amp;authkey=ARiX_xa4YNZd2nI6DtCiX98">Prospection visit<br /><br /> - SSM / ADV</a></li><li>
</li><li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">BDDUse - FilesCreation<br /> - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Website%20Live%20Chat_20161121.pdf">Website live chat<br /> - SSM / ADV</a></li>
</ul>
</li>
<li><a href="/company">CR</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">BDDUse - FilesCreation<br /> - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Website%20Live%20Chat_20161121.pdf">Website live chat<br /> - SSM / ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Management%20of%20the%20Info%20Box.pdf">Management<br /> of the Infobox - ADV</a></li>
</ul>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">CR Process 1:<br />CR creation /<br />qualification /<br />TC requests<br/>- SSM / ADV</a></li>
</ul>
</li>
<li><a href="/invoice">Contact</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Gene%20search%20161005-VF.pdf">Gene search - SSM</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-TC%20and%20Webinar%20Set%20Up.pdf">TC and Webinar Set Up - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Gestion%20CDA_MSA_Letters.pdf">Gestion CDA/MSA - ADV</a></li>
</ul>
</li>
<li><a href="/invoice">Offer</a>
<ul class="submenu">
<li><a href="/invList">create Offer using ZBD - SSM</a></li>
</ul>
</li>
<li><a href="/contact">FUP</a></li>
<li><a href="/expenses">Expenses</a>
<ul class="submenu">
<li><a href="/expenselist">View All Expenses</a></li>
</ul>
</li>
<li><a href="/personaldetails">CS</a>
<ul class="submenu">
<li><a href="/yourmoney">congress managment -ssm / adv</a></li>
<li><a href="/mydetails">My Details</a></li>
<li><a href="/admindetails">Admin Details</a></li>
<li><a href="/contracts">Contracts</a></li>
</ul>
</li>
<li><a href="/company">Nego</a>
<ul class="submenu">
<li><a href="/taxsettings">Tax Settings</a></li>
</ul>
</li>
<li><a href="/invoice">Deal Closing</a>
<ul class="submenu">
<li><a href="/invList">View All Invoices</a></li>
</ul>
</li>
<li><a href="/contact">Kick off project</a></li>
<li><a href="/home">Project development</a></li>
</ul>

</nav>

最佳答案

感谢您的快速回复,我已经能够管理该菜单了

@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,600,700");
body,
html {
font-family: 'Open Sans';
}

.contentwrapper {
margin-left: 0px!important;
margin-right: 0px!important;
}
nav {
position: relative;
margin-top: 200px;
padding: 0 2vw;
background: rgba(232, 227, 227, 1.05);
}

nav ul {
position: relative;
list-style: none;
margin: 0;
padding: 0;
display: inline;
}

nav>ul:last-of-type {
float: right;
}

nav ul > li > a, nav ul > li > a:focus {
background-color:rgba(232, 227, 227, 1.05);
}

nav>ul>li {
display: inline;
position: relative;
margin: 0;
padding: 0;
background-color: rgba(232, 227, 227, 1.05);
}

nav ul>li>a,
nav ul>li>a:focus {
color: #000;
font-weight: 600;
font-size: 13px;
display: table-cell;
height: 100%;
padding: 15px 20px;
text-decoration: none;
transition: all linear 0.1s;
-webkit-transition: all linear 0.1s;
-moz-transition: all linear 0.1s;
}

nav ul>li>a>span {
margin-left: 10px;
transition: all linear 0.1s;
-webkit-transition: all linear 0.1s;
-moz-transition: all linear 0.1s;
}

nav ul ul.submenu {
display: none;
position: absolute;
left: 0;
top: 100%;
list-style: none;
top: 100%;
background: rgba(232, 227, 227, 1.05);
z-index: 99;
}

nav ul ul.upmenu {
display: none;
position: absolute;
left: 0;
top: -130px;
background: rgba(232, 227, 227, 1.05);
z-index: 100;
}

nav ul ul.upmenu li,
nav ul ul.upmenu li a {
width: 140px;
}

nav ul ul.submenu li,
nav ul ul.submenu li a {
width: 200px;
}

nav>ul>li:hover ul.submenu {
display: inline-block;
}
nav>ul>li:hover ul.upmenu {
display: inline-block;
}

nav ul>li:hover>a {
color: #fff !important;
background: #ce0000;
text-decoration: none;
}

nav ul.submenu>li:hover>a,
nav ul.submenu>li>a.active {
background: rgba(206, 0, 0, 0.8);
}
<xz xmlns="http://www.w3.org/1999/xhtml"><nav id="navbar" class="navigation">

<!-- KEEP NAV MINIFIED - NEEDED FOR LAYOUT -->

<ul>

<li><a href="/personaldetails">Action Prospection</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/SitePages/testepage.aspx">Congress management<br /> - SSM / ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/_layouts/15/guestaccess.aspx?docid=0e5a745b5adb945d08c00368b3762fc9b&amp;authkey=ARiX_xa4YNZd2nI6DtCiX98">Prospection visit<br /><br /> - SSM / ADV</a></li><li>
</li><li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">BDDUse - FilesCreation<br /> - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Website%20Live%20Chat_20161121.pdf">Website live chat<br /> - SSM / ADV</a></li>
</ul>
</li>
<li><a href="/company">CR</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">BDDUse - FilesCreation<br /> - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Website%20Live%20Chat_20161121.pdf">Website live chat<br /> - SSM / ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Management%20of%20the%20Info%20Box.pdf">Management<br /> of the Infobox - ADV</a></li>
</ul>
<ul class="upmenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">CR Process 1<br /> CR creation / qualification /<br />TC requests<br/>- SSM / ADV</a></li>
</ul>
</li>
<li><a href="/invoice">Contact</a>
<ul class="submenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Gene%20search%20161005-VF.pdf">Gene search - SSM</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-TC%20and%20Webinar%20Set%20Up.pdf">TC and Webinar Set Up - ADV</a></li>
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/A-Commercial%20Contact%20Procedures/PU-SSM-Gestion%20CDA_MSA_Letters.pdf">Gestion CDA/MSA - ADV</a></li>
</ul>
</li>
<li><a href="/invoice">Offer</a>
<ul class="submenu">
<li><a href="/invList">create Offer using ZBD - SSM</a></li>
</ul>
<ul class="upmenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">CR Process 2: Contact /offer /Fups - SSM /ADV</a></li>
</ul>
</li>
<li><a href="/contact">FUP</a></li>
<li><a href="/expenses">Expenses</a>
<ul class="submenu">
<li><a href="/expenselist">View All Expenses</a></li>
</ul>
</li>
<li><a href="/personaldetails">CS</a>
<ul class="submenu">
<li><a href="/yourmoney">congress managment -ssm / adv</a></li>
<li><a href="/mydetails">My Details</a></li>
<li><a href="/admindetails">Admin Details</a></li>
<li><a href="/contracts">Contracts</a></li>
</ul>
<ul class="upmenu">
<li><a href="https://genoway69.sharepoint.com/ssmteam/ProcedureSSM/B-Data%20Bases%20Procedures/PU-SSM-BBDUse_FilesCreation-20170912.pdf">CR Process 1<br /> CR creation / qualification /<br />TC requests<br/>- SSM / ADV</a></li>
</ul>
</li>
<li><a href="/company">Nego</a>
<ul class="submenu">
<li><a href="/taxsettings">Tax Settings</a></li>
</ul>
</li>
<li><a href="/invoice">Deal Closing</a>
<ul class="submenu">
<li><a href="/invList">View All Invoices</a></li>
</ul>
</li>
<li><a href="/contact">Kick off project</a></li>
<li><a href="/home">Project development</a></li>
</ul>

</nav>

关于html - 制作下拉菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46833530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com