gpt4 book ai didi

UL > LI > LI 的 CSS 问题

转载 作者:太空宇宙 更新时间:2023-11-03 23:59:17 25 4
gpt4 key购买 nike

在我尝试完成的网站上,我在为主导航菜单获取正确的 CSS 时遇到了一些问题。

当菜单项有子页面时,这些子页面的下拉菜单应该是没有边框的纯色,但底部有圆 Angular 并且还有阴影。

我大体上是正确的,但是中间链接 (LI) 的圆 Angular 与最后一个 LI 相同,我不明白为什么。

我还注意到我的菜单的 LI 悬停没有得到它们应该在的圆 Angular 。

站点是http://landtrecruitment.com.au .

谢谢

最佳答案

enter image description here

试试这个

.menu ul > li + li{
border: 0 solid #333333;
border-radius: 0 0 10px 10px;
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3);
}

请在上面的css中加上+li

.menu ul > li + li + li{
border: 0 solid #333333;
border-radius: 0 0 10px 10px;
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3);
}

http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_nth-last-child

 .menu ul  li:nth-last-child(1)

{
border: 0 solid #333333;
border-radius: 0 0 10px 10px;
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3);}

关于UL > LI > LI 的 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17462851/

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