Files
maqt-desktop/src/styles/animations.css
Chen Gu 5bd314deb2 chore: initial commit - maqt-desktop v0.2
- Phase 1-5: UI framework, auth, weapon schemes, color filters, system optimization
- Industrial/tech design style with Chinese localization
- Points to gch3n.online/delta backend API
- Hardware monitor, filter editor, and all module pages
2026-05-09 00:31:09 +08:00

253 lines
4.2 KiB
CSS

/* ===== 扫描线效果 ===== */
@keyframes scanline {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(100%);
}
}
.animate-scanline {
position: relative;
overflow: hidden;
}
.animate-scanline::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
background: linear-gradient(
to bottom,
transparent 0%,
rgba(42, 157, 111, 0.1) 50%,
transparent 100%
);
animation: scanline 3s linear infinite;
pointer-events: none;
}
/* ===== 十字准星展开动画 ===== */
@keyframes crosshair-expand {
0% {
transform: scale(0) rotate(45deg);
opacity: 0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1) rotate(0deg);
opacity: 1;
}
}
.animate-crosshair {
animation: crosshair-expand 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
/* 十字准星线条 */
.crosshair-line {
position: absolute;
background: var(--military-400);
}
.crosshair-line.horizontal {
width: 20px;
height: 2px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.crosshair-line.vertical {
width: 2px;
height: 20px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* ===== 数字滚动动画 ===== */
@keyframes digit-scroll {
0% {
transform: translateY(100%);
opacity: 0;
}
20% {
opacity: 1;
}
80% {
opacity: 1;
}
100% {
transform: translateY(-100%);
opacity: 0;
}
}
.animate-digit {
display: inline-block;
animation: digit-scroll 0.3s ease-out forwards;
}
/* 数字递增效果 */
@keyframes count-up {
from {
--num: 0;
}
to {
--num: var(--target);
}
}
.animate-count-up {
animation: count-up 0.5s ease-out forwards;
counter-reset: num var(--num);
}
.animate-count-up::after {
content: counter(num);
}
/* ===== 边框流光效果 ===== */
@keyframes border-flow {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.animate-border-flow {
position: relative;
background: linear-gradient(
90deg,
var(--charcoal-800),
var(--military-600),
var(--darkgold-500),
var(--military-600),
var(--charcoal-800)
);
background-size: 300% 100%;
animation: border-flow 3s ease infinite;
}
/* 流光边框容器 */
.border-flow-container {
position: relative;
}
.border-flow-container::before {
content: '';
position: absolute;
inset: 0;
padding: 1px;
border-radius: inherit;
background: linear-gradient(
90deg,
var(--military-600),
var(--darkgold-500),
var(--military-600)
);
background-size: 200% 100%;
animation: border-flow 2s linear infinite;
-webkit-mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
/* ===== 脉冲效果 ===== */
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 0 5px var(--military-500), 0 0 10px var(--military-500);
}
50% {
box-shadow: 0 0 15px var(--military-400), 0 0 25px var(--military-400);
}
}
.animate-pulse-glow {
animation: pulse-glow 2s ease-in-out infinite;
}
/* ===== 闪烁效果 ===== */
@keyframes blink {
0%, 50% {
opacity: 1;
}
51%, 100% {
opacity: 0;
}
}
.animate-blink {
animation: blink 1s step-end infinite;
}
/* ===== 渐变扫描 ===== */
@keyframes gradient-shift {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.animate-gradient {
background-size: 200% 200%;
animation: gradient-shift 5s ease infinite;
}
/* ===== 悬浮动画 ===== */
@keyframes float {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}
.animate-float {
animation: float 3s ease-in-out infinite;
}
/* ===== 数据流动效果 ===== */
@keyframes data-flow {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
.animate-data-flow {
background: linear-gradient(
90deg,
transparent,
rgba(42, 157, 111, 0.3),
transparent
);
background-size: 50% 100%;
animation: data-flow 2s linear infinite;
}