1
我差不多在这里完成w /我的菜单。不过,我有两个问题。滚动和边框CSS问题
- 我无法在列表的最后一项上添加1px实心边框#fff。
- 我需要删除左侧的垂直滚动条。
这里是我的CSS:
#nav li ul {
opacity: 0;
height: 0px;
}
#nav li a {
font-style: normal;
font-weight: 400;
position: relative;
display: block;
padding: 16px 25px;
color: #fff;
white-space: nowrap;
z-index: 2;
text-decoration: none
}
#nav li a:hover {
color: #c0392b;
background-color: #ecf0f1;
}
#nav ul li {
background-color: #e74c3c;
color: #fff;
display: block;
list-style: disc;
}
#nav li:first-child {
border-top: 1px solid #fff;
}
#nav ul {
margin: 0;
padding: 0;
}
#nav .fa { margin: 0px 17px 0px 0px; }
.logo {
width: 100%;
padding: 21px;
margin-bottom: 20px;
box-sizing: border-box;
}
#logo{
color: #fff;
font-size: 30px;
font-style: normal;
}
.sidebar-icon {
position: relative;
float: right;
text-align: center;
line-height: 1;
font-size: 25px;
padding: 6px 8px;
color: #fff;
}
.disp {
opacity: 1!important;
height:auto!important;
transition: height 100ms ease-in-out;
transition-delay: 300ms;
}
#nav li span:first-child {
margin-left: 32px;
}
asdasdasdasdasdasdasdassa
在一个侧面说明,我不认为这将是希望有溢出隐藏默认的HTML /身体,也许运可以将其添加为切换类,当菜单可见 –
为边框时,它将下拉菜单的最后一个子菜单的边框加倍。在这里查看屏幕截图:http://prnt.sc/as6ibs –
2.作为您的旁注。那我该如何添加那个切换类呢?你能告诉我jQuery吗? –