@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
73 lines (71 loc) • 2.17 kB
CSS
:root,
page {
--nut-scale-f: 1;
--nut-scale-font: var(--nut-scale-f, 1);
--nut-scale-icon: var(--nut-scale-f, 1);
--nut-icon-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) ;
--nut-icon-width: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) ;
--nut-icon-line-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) ;
}
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-progress {
display: flex;
align-items: center;
position: relative;
width: 100%;
}
.nut-progress-outer {
flex: 1;
border-radius: var(--nutui-progress-border-radius, calc(12px * var(--nut-scale-f, 1)));
height: var(--nutui-progress-height, calc(10px * var(--nut-scale-f, 1)));
background: var(--nutui-progress-background, var(--nutui-color-background, #f2f3f5));
}
.nut-progress-outer .nut-progress-active:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: var(--nutui-progress-border-radius, calc(12px * var(--nut-scale-f, 1)));
animation: progressActive 2s ease-in-out infinite;
}
.nut-progress-inner {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
transition: all 0.4s;
border-radius: var(--nutui-progress-border-radius, calc(12px * var(--nut-scale-f, 1)));
background: var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
}
.nut-progress-text {
display: flex;
align-items: center;
transition: all 0.4s;
margin-left: calc(12px * var(--nut-scale-f, 1));
color: var(--nutui-color-text-help, #888b94);
font-family: PingFang SC;
font-size: var(--nutui-progress-text-font-size, calc(13px * var(--nut-scale-font, var(--nut-scale-f, 1))));
}
@keyframes progressActive {
0% {
background: rgba(255, 255, 255, 0.1);
width: 0;
}
20% {
background: rgba(255, 255, 255, 0.5);
width: 0;
}
to {
background: rgba(255, 255, 255, 0);
width: 100%;
}
}
[dir=rtl] .nut-progress-text,
.nut-rtl .nut-progress-text {
transform: translate(50%);
}