我正在使用Bootstrap。当我有一个白色背景时,没有问题,导航栏项看起来如下,这很好:
但是当我有蓝色背景时,我会在两侧得到2条线,如下所示。有没有办法删除它?我试过边框:0并没有区别。
switch(indexPath.Row)
{
case 0:
cellWidth = bounds.Width / 4;
cellHeight = bounds.Height / 4;
break;
case 1:
cellWidth = bounds.Width / 2;
cellHeight = bounds.Height / 4;
break;
case 2:
cellWidth = bounds.Width / 4;
cellHeight = bounds.Height / 4;
break;
case 3:
cellWidth = bounds.Width / 2;
cellHeight = bounds.Height/ 0.75f;
break;
case 4:
cellWidth = bounds.Width / 2;
cellHeight = bounds.Height / 4;
break;
case 5:
cellWidth = bounds.Width / 2;
cellHeight = bounds.Height / 4;
break;
}
答案 0 :(得分:1)
根据您的CODEPEN,您的边线问题位于a
标记,而不是li
标记。
将此添加到您的CSS:
.navbar-custom .navbar-nav > li > a,
.navbar-custom .navbar-nav > li:last-child > a {
border: none;
}
查看更正的DEMO
答案 1 :(得分:1)
的CSS:
a {
border:none !important;
}
(!important优先于其他所有内容)