最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vue?頂部消息橫向滾動通知效果實現(xiàn)

 更新時間:2024年02月29日 15:15:28   作者:努力學(xué)習(xí)的木子  
系統(tǒng)頂部展示一個橫向滾動的消息通知,就是消息內(nèi)容從右往左一直滾動,這篇文章主要介紹了vue頂部消息橫向滾動通知,需要的朋友可以參考下

前言

系統(tǒng)頂部展示一個橫向滾動的消息通知,就是消息內(nèi)容從右往左一直滾動。

效果如下:

代碼

使用

<template>
  <div class="notic-bar">
    <img :src="notic" class="notice-img" />
    <div class="notice-bar-container">
      <div class="notice-bar__wrap">
        <div
          v-for="(item, index) in list"
          :key="index"
          class="notice-bar__wrap_text"
        >
          {{ item }}
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import notic from "../../public/notic.png";
const list = [
  "開發(fā)不易,感謝理解",
  "",
  "感謝您的理解",
  "",
  "您的支持是我繼續(xù)完善的動力",
];
</script>
<style lang="scss" scoped>
.notic-bar {
  display: flex;
  background: #67c23a;
  margin: 5px;
  border-radius: 5px;
  padding: 2px 5px;
}
.notice-bar-container {
  display: flex;
  width: calc(100% - 30px);
  height: 20px;
  overflow: hidden;
  margin-left: 5px;
}
.notice-img {
  width: 20px;
  height: 20px;
}
.notice-bar__wrap {
  margin-left: 10px;
  display: flex;
  animation: move 20s linear infinite;
  line-height: 20px;
  color: #f5f6f7;
  .notice-bar__wrap_text {
    width: max-content;
    min-width: 100px;
  }
}
@keyframes move {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
</style>

到此這篇關(guān)于vue 頂部消息橫向滾動通知效果實現(xiàn)的文章就介紹到這了,更多相關(guān)vue 消息橫向滾動內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論

隆德县| 方正县| 车致| 秦安县| 武冈市| 华蓥市| 什邡市| 耿马| 拜城县| 得荣县| 娄底市| 新化县| 永兴县| 凌海市| 屏山县| 镇原县| 栾川县| 定兴县| 五华县| 沾化县| 棋牌| 哈尔滨市| 海阳市| 南皮县| 浙江省| 徐州市| 平乐县| 青龙| 渝中区| 金寨县| 镇巴县| 天峨县| 剑河县| 罗甸县| 兰州市| 蒙自县| 贵溪市| 道孚县| 黄浦区| 崇阳县| 安新县|