mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-11 01:38:56 +08:00
99 lines
1.5 KiB
CSS
99 lines
1.5 KiB
CSS
@import './common/var.css';
|
|
|
|
.van-tabs {
|
|
position: relative;
|
|
|
|
&__nav-wrap {
|
|
overflow: hidden;
|
|
}
|
|
|
|
&__swipe {
|
|
user-select: none;
|
|
transition: transform linear .2s;
|
|
|
|
.van-tab {
|
|
flex: 0 0 22%;
|
|
}
|
|
|
|
.van-tabs__nav {
|
|
overflow: visible;
|
|
}
|
|
}
|
|
|
|
&__nav {
|
|
overflow: hidden;
|
|
transition: transform .5s cubic-bezier(.645, .045, .355, 1);
|
|
position: relative;
|
|
display: flex;
|
|
|
|
&--line {
|
|
height: 44px;
|
|
|
|
.van-tab {
|
|
&::after {
|
|
border-width: 1px 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
&--card {
|
|
height: 28px;
|
|
margin: 0 15px;
|
|
background-color: $white;
|
|
border-radius: 2px;
|
|
border: 1px solid $gray-darker;
|
|
overflow: hidden;
|
|
|
|
.van-tab {
|
|
color: $gray-darker;
|
|
line-height: 28px;
|
|
border-right: 1px solid $gray-darker;
|
|
|
|
&:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
&.van-tab--active {
|
|
background-color: $gray-darker;
|
|
color: $white;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__nav-bar {
|
|
z-index: 1;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 2px;
|
|
background-color: #f13e3a;
|
|
transition: transform .3s cubic-bezier(.645, .045, .355, 1);
|
|
transform-origin: 0 0;
|
|
}
|
|
}
|
|
|
|
.van-tab {
|
|
position: relative;
|
|
color: $text-color;
|
|
background-color: $white;
|
|
font-size: 14px;
|
|
line-height: 44px;
|
|
box-sizing: border-box;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
flex: 1;
|
|
|
|
&--active {
|
|
color: $red;
|
|
}
|
|
|
|
&__pane {
|
|
display: none;
|
|
|
|
&--select {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|