global.css
2.82 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/* @import "./reset.css"; */
@import "./theme.css";
@import "./table-styles.css";
/* 全局样式 */
/* global.css - 全局通用样式与响应式断点 */
:root {
--primary-color: #3399ff;
--success-color: #4caf50;
--danger-color: #f44336;
--warning-color: #ffc107;
--color-warning: var(--warning-color);
--color-success: var(--success-color);
--font-size-base: 16px;
--border-radius: 8px;
}
html {
font-size: 16px;
-webkit-text-size-adjust: 100%;
}
@media (max-width: 1200px) {
html {
font-size: 15px;
}
}
@media (max-width: 992px) {
html {
font-size: 14px;
}
}
@media (max-width: 768px) {
html {
font-size: 13px;
}
}
@media (max-width: 600px) {
html {
font-size: 12px;
}
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 全局动画和过渡效果 */
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s ease;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.slide-enter-active,
.slide-leave-active {
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-enter,
.slide-leave-to {
transform: translateX(-100%);
}
.scale-enter-active,
.scale-leave-active {
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scale-enter,
.scale-leave-to {
transform: scale(0.9);
opacity: 0;
}
/* 悬停效果增强 */
.hover-lift {
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
transform: translateY(-2px);
}
/* 聚焦效果 */
.focus-ring:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(51, 153, 255, 0.3);
}
/* 全局按钮样式 */
.el-button--primary {
background: #1e6fff !important;
border-color: #1e6fff !important;
color: #fff !important;
}
.el-button--primary:hover {
background: #4179fc !important;
border-color: #4179fc !important;
color: #fff !important;
}
.el-button--primary:focus {
background: #3399ff !important;
border-color: #3399ff !important;
color: #fff !important;
}
/* 滚动条美化 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background: transparent;
}
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 4px;
transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
::-webkit-scrollbar-corner {
background: transparent;
}
/* 深色主题滚动条 */
.theme-dark ::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
}
.theme-dark ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.15);
}
.theme-dark ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.25);
}