我正在尝试为ngb-tabset创建自定义设计
这是html代码
<ngb-tabset>
<ngb-tab>
<ng-template ngbTabTitle><span class="tab-title">All Professional Learnings</span></ng-template>
<ng-template ngbTabContent>
<app-all-professional-learnings></app-all-professional-learnings>
</ng-template>
</ngb-tab>
<ngb-tab>
<ng-template ngbTabTitle><span class="tab-title">My Professional Learnings</span></ng-template>
<ng-template ngbTabContent>
<app-my-professional-learnings></app-my-professional-learnings>
</ng-template>
</ngb-tab>
</ngb-tabset>
我尝试过的一些CSS
.nav-link.active, .nav-pills .show > .nav-link {
background-color: transparent !important;
color: $primary !important;
border-radius: 0;
border-bottom: 3px solid;
padding-bottom: 2px;
border-color: #dee2e6 #dee2e6 $primary !important;
}
.nav-link {
margin-bottom: 25px !important;
color: $primary !important;
border-left: 0px solid !important;
border-right: 0px solid !important;
border-top: 0px solid !important;
}
.nav-tabs{
border-bottom: 0 !important;
}
我使用的设计创建了如下所示的设计
谁能告诉我如何设计上述选项卡
答案 0 :(得分:1)
尝试一下。应该可以。
.nav-link.active, .nav-pills .show > .nav-link {
background-color: #CD853F !important;
color: white !important;
border-radius: 0;
border: 3px solid #CD853F;
padding-bottom: 2px;
}
.nav-link {
margin-bottom: 25px !important;
color: #CD853F !important;
border: 3px solid #CD853F !important;
}
.nav-tabs{
border-bottom: 0 !important;
}
我不确定您使用的变量是什么,所以我用十六进制值代替了它们。
答案 1 :(得分:0)
@M M解决方案中的一些更改
.nav-link.active, .nav-pills .show > .nav-link {
background-color: $primary !important;
color: white !important;
border-radius: 0;
border-bottom: 3px solid $primary;
padding-bottom: 2px;
}
.nav-link {
margin-bottom: 25px !important;
color: $primary !important;
border: 3px solid $primary !important;
}
.nav-tabs .nav-link{
border-top-left-radius: 0rem;
border-top-right-radius: 0rem;
}
.nav-tabs .nav-link.active {
border: 6px solid #9f8148 !important;
}