Commit df500019 authored by longchaozhong's avatar longchaozhong

feat: 走马灯效果

parent 2777c6ee
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
</div> </div>
<div class="notic"> <div class="notic">
<img class="icon" src="../assets/uliss/volume-up.png" alt="" /> <div class="icon-wrapper"><img class="icon" src="../assets/uliss/volume-up.png" alt="" />公告:</div>
<span class="msg one-line" <div class="msg">
>公告:2022-2023学年数据上报站点于2023年9月1日正式启用,上报站点于2023年9月1日正式启用</span <span class="scroll-txt">2022-2023学年数据上报站点于2023年9月1日正式启用,上报站点于2023年9月1日正式启用</span>
> </div>
<span class="date">今天是2023/6/26 星期一</span> <span class="date">今天是2023/6/26 星期一</span>
</div> </div>
...@@ -289,14 +289,25 @@ export default { ...@@ -289,14 +289,25 @@ export default {
color: #ffffff; color: #ffffff;
align-items: center; align-items: center;
.icon { .icon-wrapper {
flex-shrink: 0; flex-shrink: 0;
}
.icon {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin-right: 10px; margin-right: 10px;
vertical-align: middle;
} }
.msg { .msg {
flex-grow: 1; flex-grow: 1;
overflow: hidden;
white-space: nowrap;
}
.scroll-txt {
display: inline-block;
white-space: nowrap;
animation: scroll 10s linear infinite;
} }
.date { .date {
...@@ -518,4 +529,13 @@ export default { ...@@ -518,4 +529,13 @@ export default {
line-height: 36px; line-height: 36px;
margin-top: 112px; margin-top: 112px;
} }
@keyframes scroll {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment