mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-21 22:09:16 +08:00
109 lines
1.6 KiB
CSS
109 lines
1.6 KiB
CSS
@import './common/var.css';
|
|
@import './mixins/ellipsis.css';
|
|
|
|
.van-tabs {
|
|
position: relative;
|
|
|
|
&__swipe {
|
|
user-select: none;
|
|
|
|
.van-tab {
|
|
flex: 0 0 22%;
|
|
}
|
|
|
|
.van-tabs__nav {
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__nav {
|
|
display: flex;
|
|
position: relative;
|
|
background-color: $white;
|
|
|
|
&--line {
|
|
height: 44px;
|
|
}
|
|
|
|
&--card {
|
|
height: 28px;
|
|
margin: 0 15px;
|
|
border-radius: 2px;
|
|
border: 1px solid $gray-darker;
|
|
|
|
.van-tab {
|
|
color: $gray-darker;
|
|
line-height: 28px;
|
|
border-right: 1px solid $gray-darker;
|
|
|
|
&:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
&.van-tab--active {
|
|
color: $white;
|
|
background-color: $gray-darker;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__nav-bar {
|
|
z-index: 1;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 2px;
|
|
position: absolute;
|
|
background-color: $red;
|
|
}
|
|
}
|
|
|
|
.van-tab {
|
|
flex: 1;
|
|
cursor: pointer;
|
|
padding: 0 5px;
|
|
font-size: 14px;
|
|
position: relative;
|
|
color: $text-color;
|
|
line-height: 44px;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
background-color: $white;
|
|
min-width: 0; /* hack for flex ellipsis */
|
|
|
|
span {
|
|
display: block;
|
|
@mixin ellipsis;
|
|
}
|
|
|
|
&:active {
|
|
background-color: $active-color;
|
|
}
|
|
|
|
&--active {
|
|
color: $red;
|
|
}
|
|
|
|
&--disabled {
|
|
color: $gray;
|
|
|
|
&:active {
|
|
background-color: $white;
|
|
}
|
|
}
|
|
|
|
&__pane {
|
|
display: none;
|
|
|
|
&--select {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|