动态公告

 

 <view class="marquee-container">
          <text class="marquee" :class="{ 'marquee--move': isMoving }" ref="marquee">{{text }}</text>
</view>

data:{
    return:{
        text:"公告展示"
    }
}
.marquee-container { width: 100%; display: flex; overflow: hidden; position: relative; } .marquee { display: inline-block; white-space: nowrap; animation: marqueeAnimation 5s linear infinite; } .marquee--move { animation-play-state: running; } @keyframes marqueeAnimation { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

  

posted @ 2025-05-26 17:33  挽你手  阅读(8)  评论(0)    收藏  举报