我有这样的选项卡:https://codepen.io/anon/pen/KZoLWp
我想删除第一个索引中的md-tab::after
,我正在使用ng-reapet制作选项卡。试
.md-tab:last-child::after{display: none;}
但似乎不适用于此元素。有什么帮助吗?
我想
你想删除连接选项卡的细线。
- 要从第一个选项卡中删除:
.md-tab:first-child::after {
content: none
}
或
.md-tab:first-of-type::after{
content: none
}
- 要从上一个选项卡中删除:
.md-tab:last-of-type::after{
content: none
}
- 要从任何选项卡中删除:
.md-tab:nth-child(1)::after{
content: none
} // removes from first tab
.md-tab:nth-child(2)::after{
content: none
} // removes from second tab
.md-tab:nth-child(3)::after{
content: none
} // removes from third tab
只需更新nth-child(N)
中'N'
的值即可。这种方法有点通用,使用 CSS 的第 n 个子属性。
- 要从所有选项卡中删除:
.md-tab::after{content: none}
感谢@UncaughtTypeError评论。
md-tab-item:last-of-type::after
{
display:none !important;
}
工作。