mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
5747d1590d
Co-authored-by: liujintao03 <liujintao03@baidu.com>
155 lines
3.0 KiB
SCSS
155 lines
3.0 KiB
SCSS
.#{$ns}Progress {
|
|
&-line {
|
|
display: inline-block;
|
|
width: 100%;
|
|
margin-right: calc(-2em + -8px);
|
|
padding-right: calc(2em + 8px);
|
|
|
|
&-inter {
|
|
height: 10px;
|
|
background-color: var(--Progress-bar-backgroundColor);
|
|
overflow: hidden;
|
|
border-radius: var(--Progress-borderRadius);
|
|
}
|
|
|
|
&-no-label {
|
|
padding-right: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
&-text {
|
|
display: inline-block;
|
|
width: 2em;
|
|
margin-left: 8px;
|
|
color: var(--text-color);
|
|
font-size: var(--fontSizeXs);
|
|
white-space: nowrap;
|
|
text-align: left;
|
|
word-break: normal;
|
|
.icon {
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
|
|
&-bar {
|
|
float: left;
|
|
width: 0;
|
|
height: 100%;
|
|
font-size: 12px;
|
|
line-height: 10px;
|
|
text-align: center;
|
|
background: var(--primary);
|
|
transition: width var(--animation-duration) ease;
|
|
|
|
&--stripe {
|
|
background-image: linear-gradient(
|
|
45deg,
|
|
rgba(255, 255, 255, 0.15) 25%,
|
|
transparent 25%,
|
|
transparent 50%,
|
|
rgba(255, 255, 255, 0.15) 50%,
|
|
rgba(255, 255, 255, 0.15) 75%,
|
|
transparent 75%,
|
|
transparent
|
|
);
|
|
background-size: 2rem 2rem;
|
|
}
|
|
|
|
&--animate {
|
|
position: relative;
|
|
transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;
|
|
&::before {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
background: var(--Progress-animate-backgroundColor);
|
|
border-radius: 10px;
|
|
opacity: 0;
|
|
animation: progress-bar-active 2.4s cubic-bezier(0.23, 1, 0.32, 1)
|
|
infinite;
|
|
content: '';
|
|
}
|
|
}
|
|
&--stripe-animate {
|
|
animation: progress-bar-stripes 1s linear infinite;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-circle {
|
|
width: 120px;
|
|
height: 120px;
|
|
position: relative;
|
|
&-text {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
color: var(--text-color);
|
|
font-size: 1em;
|
|
line-height: 1;
|
|
white-space: normal;
|
|
text-align: center;
|
|
transform: translate(-50%, -50%);
|
|
.icon {
|
|
font-size: 1.2em;
|
|
}
|
|
}
|
|
.bg-warning-circle {
|
|
&-path {
|
|
stroke: var(--warning);
|
|
}
|
|
}
|
|
.bg-danger-circle {
|
|
&-path {
|
|
stroke: var(--danger);
|
|
}
|
|
}
|
|
.bg-info-circle {
|
|
&-path {
|
|
stroke: var(--info);
|
|
}
|
|
}
|
|
.bg-success-circle {
|
|
&-path {
|
|
stroke: var(--success);
|
|
}
|
|
}
|
|
.bg-primary-circle {
|
|
&-path {
|
|
stroke: var(--primary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes progress-bar-active {
|
|
0% {
|
|
transform: translateX(-100%) scaleX(0);
|
|
opacity: 0.1;
|
|
}
|
|
|
|
20% {
|
|
transform: translateX(-100%) scaleX(0);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
100% {
|
|
transform: translateX(0) scaleX(1);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes progress-bar-stripes {
|
|
from {
|
|
background-position: 2rem 0;
|
|
}
|
|
to {
|
|
background-position: 0 0;
|
|
}
|
|
}
|