为 ngb-tabset 创建自定义 CSS 设计
Create a custom CSS design for ngb-tabset
我正在尝试为 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;
}
我使用的设计创建了如下图所示的设计
谁能告诉我如何设计像上面那样的标签
试试这个。应该可以。
.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;
}
我不确定你使用的变量,所以我用十六进制值替换了它们。
@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;
}
我正在尝试为 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;
}
我使用的设计创建了如下图所示的设计
谁能告诉我如何设计像上面那样的标签
试试这个。应该可以。
.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;
}
我不确定你使用的变量,所以我用十六进制值替换了它们。
@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;
}