steps.css
2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/**
* steps.js是基于原生JavaScript的组件,可用于展示步骤条、时间轴等。
* time:2018-09-22
* version:1.0
* by 樊小书生: http://www.fxss5201.cn/
* github: https://github.com/fxss5201/steps
*/
.steps {
display: flex;
padding: 10px;
box-sizing: border-box;
}
.steps-horizontal {
white-space: nowrap;
}
.steps-vertical {
display: flex;
flex-direction: column;
height: 100%;
}
.steps-center {
text-align: center;
}
.step {
position: relative;
flex-shrink: 1;
}
.steps-horizontal .step {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.steps-horizontal.steps-center .step {
align-items: center;
}
.steps-vertical .step {
display: flex;
}
.step-line-box {
position: relative;
width: 100%;
margin-bottom: 10px;
}
.steps-vertical .step-line-box {
flex-grow: 0;
width: auto;
margin-right: 10px;
margin-bottom: 0;
}
.step-line {
position: absolute;
height: 2px;
top: 11px;
left: 0;
right: 0;
border-color: inherit;
background-color: #c0c4cc;
}
.steps-vertical .step-line {
width: 2px;
top: 0;
bottom: 0;
left: 11px;
height: 100%;
}
.steps-center .step-line {
left: 50%;
right: -50%;
}
.step-icon {
position: relative;
z-index: 1;
display: inline-flex;
justify-content: center;
align-items: center;
width: 24px;
height: 24px;
font-size: 14px;
box-sizing: border-box;
background: #fff;
transition: .15s ease-out;
border-radius: 50%;
border: 2px solid;
border-color: inherit;
}
.step-icon-number {
display: inline-block;
user-select: none;
text-align: center;
font-weight: 700;
line-height: 1;
color: inherit;
}
.step-icon-bullets {
display: inline-block;
user-select: none;
width: 14px;
height: 14px;
background-color: currentColor;
border-radius: 50%;
}
.step-title {
white-space: pre-line;
padding-right: 10%;
font-size: 16px;
margin-bottom: 10px;
}
.steps-vertical .step-title {
text-align: right;
line-height: 24px;
padding: 0 0 8px 0;
margin: 0 10px 0 0;
}
.step-description {
white-space: pre-line;
padding-right: 10%;
font-size: 12px;
line-height: 22px;
font-weight: 400;
margin: -5px 0 10px 0;
}
.steps-horizontal .step:last-child .step-title,
.steps-horizontal .step:last-child .step-description {
padding-right: 0;
}
.steps-vertical .step-description {
line-height: 20px;
padding: 0 0 8px 0;
margin: 0 10px 0 0;
}
.steps-center .step-title,
.steps-center .step-description {
padding-right: 0;
}
.steps .step:last-child .step-line {
display: none;
}
.step-default-class {
color: #999;
border-color: #999;
}
.step-finish-class {
color: #409eff;
border-color: #409eff;
}
.step-finish-line-bg {
background-color: #409eff;
}