圆角导航栏

ppa*_*aul 2 html css

我喜欢我的导航栏上的角落有问题,当我写的时候 - border-radius: 15px; 它围绕着所有的角落,<a>但我只想要围绕<li>整个工具栏的边缘.

这是一个小提琴.

谢谢

编辑

只想要家和联系四舍五入

Asi*_*sif 6

这也有效:

ul#list-nav li {
   border:2px solid blue;
   float:left;
   overflow:hidden;
}

li.first{
   border-top-left-radius:15px;
   border-bottom-left-radius:15px;
}
li.last{
    border-top-right-radius:15px;
   border-bottom-right-radius:15px;
}
Run Code Online (Sandbox Code Playgroud)

这是更新的小提琴.