我有这些正常运行的下拉菜单,除了菜单的底 Angular 不是圆 Angular 。我包含了 html、css 和 jquery 代码。你知道为什么我最后的列表项没有显示圆底 Angular 吗?
感谢您的宝贵时间!
HTML
<nav>
<ul>
<li><a id="Me" href="#">About Me</a>
<li><a href="#">Favorite Films</a>
<!-- Films Drop-Down Menu -->
<ul>
<li><a id="DC" href="#">DC Cinematic Universe</a></li>
<li><a id="Bond" href="#">James Bond</a></li>
<li><a id="Marvel" href="#">Marvel Cinematic Universe</a></li>
<li><a id="ST" href="#">Star Trek</a></li>
<li><a id="SW" href="#">Star Wars</a></li>
<li><a id="X" href="#">X-Men</a></li>
</ul>
<!-- /Films Drop-Down Menu -->
</li>
<li><a href="#">Favorite TV Shows</a>
<!-- TV Drop Down Menu -->
<ul>
<li><a id="Americans" href="#">Americans, The</a></li>
<li><a id="GoT" href="#">Game of Thrones</a></li>
</ul>
<!-- /TV Drop Down Menu -->
</li>
</ul>
</nav>
CSS
nav {
width: 100%;
height: 2em;
float: left;
position: relative;
background: linear-gradient(hsl(1,79%,30%), hsl(1, 88%, 44%), hsl(2,90%,26%));
border: hsl(1,79%,30%) 2px solid;
border-radius: 20px 20px 0 0;
}
nav ul {
list-style: none;
}
nav li {
width: 33%;
display: inline;
float: left;
position: relative;
}
nav li a {
/* Makes entire block for link clickable - not just text. */
display: block;
color: white;
font-size: 1.5em;
font-weight:bold;
text-shadow: 5px 5px 5px black;
transform:skewX(160deg);
text-decoration: none;
}
nav li a:hover {
color: #FFCC33;
}
nav ul ul {
display: none;
position: absolute;
background: hsla(1,79%,30%,.8);
/*Z-Index enables layering - higher values put elements toward top */
z-index: 99;
}
nav li li {
float: none;
width: 100%;
position: relative;
padding: 10px;
/*border: 1px hsl(1,79%,30%);*/
}
nav li li a {
font-size: 1.25em;
}
/* Round bottom corners of menu items on bottom of drop-down menus. */
nav li li:last-child {
border-radius: 0 0 20px 20px;
}
JQUERY
//DROP-DOWN MENUS
$('nav li').hover(function() {
// stop() stops all animation before slideDown()
$('ul',this).stop().slideDown(250);
},
//When not hovering.
function(){
$('ul',this).stop().slideUp(250);
}
);
//DROP-DOWN MENUS
最佳答案
您是否尝试过将菜单放在一个 div 中,然后专门声明列表中的最后一个要四舍五入?
divname li:last-of-type a
{
border-bottom:thin solid black;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
关于jquery - 最后一个 HTML 列表项的圆底 Angular ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23850308/