mcfxkh-Web/src/views/Home/panels/Yuanyfa/WaterLevelAlert/index.less

51 lines
903 B
Plaintext
Raw Normal View History

2025-06-11 11:10:37 +08:00
.water-level-alert {
2025-06-11 11:34:17 +08:00
width: 650px;
2025-06-11 11:10:37 +08:00
background: rgba(0, 32, 51, 0.9);
padding: 10px 20px;
border-radius: 4px;
border: 1px solid #0088cc;
.alert-container {
height: 24px;
overflow: hidden;
2025-06-11 11:34:17 +08:00
position: relative;
2025-06-11 11:10:37 +08:00
}
.alert-wrapper {
2025-06-11 11:34:17 +08:00
position: absolute;
top: 0;
left: 0;
width: 100%;
animation: scrollUp 12s linear infinite; // 6秒 * 2条数据
&:hover {
animation-play-state: paused; // 鼠标悬停时暂停动画
}
2025-06-11 11:10:37 +08:00
}
.alert-item {
height: 24px;
display: flex;
align-items: center;
}
.alert-text {
color: #ffffff;
font-size: 14px;
white-space: nowrap;
&::before {
content: '⚠️';
margin-right: 8px;
}
}
2025-06-11 11:34:17 +08:00
}
@keyframes scrollUp {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-50%); // 滚动一半的高度因为我们复制了4组数据
}
2025-06-11 11:10:37 +08:00
}