mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-27 20:06:36 +08:00
144 lines
2.3 KiB
CSS
144 lines
2.3 KiB
CSS
@import './common/var.css';
|
|
|
|
.van-picker {
|
|
overflow: hidden;
|
|
background-color: $white;
|
|
|
|
&__toolbar {
|
|
height: 40px;
|
|
line-height: 40px;
|
|
overflow: hidden;
|
|
padding: 0 15px;
|
|
}
|
|
|
|
&__cancel {
|
|
color: #3388FF;
|
|
float: left;
|
|
}
|
|
|
|
&__confirm {
|
|
color: #3388FF;
|
|
float: right;
|
|
}
|
|
|
|
&__title {
|
|
height: 40px;
|
|
padding: 0 10px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
word-wrap: normal;
|
|
word-break: break-all;
|
|
text-align: center;
|
|
}
|
|
|
|
&__columns {
|
|
position: relative;
|
|
overflow: hidden;
|
|
|
|
&--1 {
|
|
.van-picker-column {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
&--2 {
|
|
.van-picker-column {
|
|
width: 50%;
|
|
}
|
|
}
|
|
|
|
&--3 {
|
|
.van-picker-column {
|
|
width: 33.333%;
|
|
}
|
|
}
|
|
|
|
&--4 {
|
|
.van-picker-column {
|
|
width: 25%;
|
|
}
|
|
}
|
|
|
|
&--5 {
|
|
.van-picker-column {
|
|
width: 20%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.van-picker-center-highlight {
|
|
box-sizing: border-box;
|
|
position: absolute;
|
|
left: 0;
|
|
width: 100%;
|
|
top: 50%;
|
|
margin-top: -18px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.van-picker-center-highlight:before,
|
|
.van-picker-center-highlight:after {
|
|
content: '';
|
|
position: absolute;
|
|
height: 1px;
|
|
width: 100%;
|
|
background-color: #eaeaea;
|
|
display: block;
|
|
transform: scaleY(0.5);
|
|
}
|
|
|
|
.van-picker-center-highlight:before {
|
|
left: 0;
|
|
top: 0;
|
|
bottom: auto;
|
|
right: auto;
|
|
}
|
|
|
|
.van-picker-center-highlight:after {
|
|
left: 0;
|
|
bottom: 0;
|
|
right: auto;
|
|
top: auto;
|
|
}
|
|
|
|
&-column {
|
|
font-size: 18px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
max-height: 100%;
|
|
float: left;
|
|
text-align: center;
|
|
|
|
&__item {
|
|
height: 44px;
|
|
line-height: 44px;
|
|
padding: 0 10px;
|
|
white-space: nowrap;
|
|
position: relative;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
color: #707274;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
transition-duration: .3s;
|
|
|
|
&--selected {
|
|
color: $black;
|
|
}
|
|
}
|
|
}
|
|
|
|
.picker-column-wrapper {
|
|
transition-duration: 0.3s;
|
|
transition-timing-function: ease-out;
|
|
}
|
|
|
|
.picker-column-wrapper.dragging,
|
|
.picker-column-wrapper.dragging .picker-item {
|
|
transition-duration: 0s;
|
|
}
|
|
}
|