@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
75 lines • 2.29 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-pickerview {
position: relative;
display: flex;
width: 100%;
height: var(--nutui-picker-list-height, 252px);
overflow: hidden;
}
.nut-pickerview-mask, .nut-pickerview-indicator {
position: absolute;
left: 0;
right: 0;
z-index: 3;
pointer-events: none;
}
.nut-pickerview-mask {
top: 0;
bottom: 0;
background-image: var(--picker-mask-background, linear-gradient(180deg, var(--nutui-white-12), var(--nutui-white-7)), linear-gradient(0deg, var(--nutui-white-12), var(--nutui-white-7)));
background-position: top, bottom;
background-size: 100% calc((var(--nutui-picker-list-height, 252px) - var(--nutui-picker-item-height, 40px)) / 2);
background-repeat: no-repeat;
transform: translateZ(0);
}
.nut-pickerview-indicator {
top: calc((var(--nutui-picker-list-height, 252px) - var(--nutui-picker-item-height, 40px)) / 2);
height: var(--nutui-picker-item-height, 40px);
border: var(--nutui-picker-item-active-line-border, 1px solid var(--nutui-color-border));
border-left: 0;
border-right: 0;
box-sizing: border-box;
}
.nut-pickerview-list {
position: relative;
flex: 1;
height: var(--nutui-picker-list-height, 252px);
overflow: hidden;
touch-action: none;
}
.nut-pickerview-roller {
position: absolute;
top: calc((var(--nutui-picker-list-height, 252px) - var(--nutui-picker-item-height, 40px)) / 2);
width: 100%;
height: var(--nutui-picker-item-height, 40px);
z-index: 1;
transform-style: preserve-3d;
}
.nut-pickerview-roller-placeholder {
height: var(--nutui-picker-item-height, 40px);
}
.nut-pickerview-roller-item {
position: absolute;
top: 0;
backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.nut-pickerview-roller-item-hidden {
visibility: hidden;
opacity: 0;
}
.nut-pickerview-roller-item, .nut-pickerview-roller-item-tiled {
width: 100%;
height: var(--nutui-picker-item-height, 40px);
line-height: var(--nutui-picker-item-height, 40px);
color: var(--nutui-picker-item-text-color, var(--nutui-color-text));
font-size: var(--nutui-picker-item-text-font-size, var(--nutui-font-h3));
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}