在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  網(wǎng)絡(luò)安全  HTML/ 如何控制每次要滾出來的li標(biāo)簽的樣式

如何控制每次要滾出來的li標(biāo)簽的樣式

<template>
  <div id="list-demo" class="demo">
    <ul>
      <li v-for="(item,index) in items" v-bind:key="index" class="list-complete-item">
        {{ item.txt }}
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: false,
      items: [
        { txt: "人生在世須盡歡, 莫使金樽空對月", show: false, id: 1 },
        { txt: "我寄愁心與明月,隨風(fēng)直到夜郎西", show: false, id: 2 },
        { txt: "不是花中偏愛菊,此花開盡更無花", show: false, id: 3 },
        { txt: "辛苦遭逢起一經(jīng),干戈寥落四周星", show: false, id: 4 },
        { txt: "山河破碎風(fēng)飄絮,身世浮沉雨打萍", show: false, id: 5 },
        { txt: "惶恐灘頭說惶恐,零丁洋里嘆零丁", show: false, id: 6 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 7 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 8 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 9 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 10 },
        { txt: "人生在世須盡歡, 莫使金樽空對月", show: false, id: 1 },
        { txt: "我寄愁心與明月,隨風(fēng)直到夜郎西", show: false, id: 2 },
        { txt: "不是花中偏愛菊,此花開盡更無花", show: false, id: 3 },
        { txt: "辛苦遭逢起一經(jīng),干戈寥落四周星", show: false, id: 4 },
        { txt: "山河破碎風(fēng)飄絮,身世浮沉雨打萍", show: false, id: 5 },
        { txt: "惶恐灘頭說惶恐,零丁洋里嘆零丁", show: false, id: 6 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 7 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 8 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 9 },
        { txt: "人生自古誰無死?留取丹心照汗青", show: false, id: 10 },

      ]
    };
  },
  mounted() {

  },
  methods: {

  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
#list-demo{
  height: 100px;
  overflow: hidden;
  position: relative;
  background-color: purple;
}
ul {
  width: 300px;
  height: auto;
  /* overflow: hidden; */
  position: absolute;
  animation: move 4s linear infinite;
  top:0;
  
}
ul>li{
  height: 30px;
  list-style: none;
  margin-bottom: 10px;
  background-color: #eee;
}

@keyframes move{
  0%{
    top:-400px;
  }
  100%{
    top: 0;
  }
}
</style>
回答
編輯回答
瞄小懶

clipboard.png
每次從底部出來的元素有一個背景由淺變深的漸變,直到運(yùn)動到第二個的時候背景漸變完成

2017年3月21日 11:06
編輯回答
久愛她

直接上圖好說話

2018年5月20日 05:32