Keys's stuff Keys's stuff
首页
  • JavaScript
  • CSS
  • 技术文档
  • GitHub
  • Nodejs
  • NPM
  • 博客搭建
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
  • 常用工具 (opens new window)
  • 索引

    • 分类
    • 标签
    • 归档
  • 网站工具参考
  • 常用类库组件
  • HTML参考手册 (opens new window)
  • 后端博客参考 (opens new window)
  • ChatGPT入门介绍 (opens new window)
  • JavaScript 教程 (opens new window)
  • ES6教程 (opens new window)
  • VUE (opens new window)
  • GIT (opens new window)
  • 学习笔记

    • 《JavaScript高级程序设计》
    • 《Vue》
    • 《React》
    • 《TypeScript 从零实现 axios》
    • TypeScript
    • JS设计模式总结
关于
GitHub (opens new window)

Keys Xu

音乐的力量
首页
  • JavaScript
  • CSS
  • 技术文档
  • GitHub
  • Nodejs
  • NPM
  • 博客搭建
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
  • 常用工具 (opens new window)
  • 索引

    • 分类
    • 标签
    • 归档
  • 网站工具参考
  • 常用类库组件
  • HTML参考手册 (opens new window)
  • 后端博客参考 (opens new window)
  • ChatGPT入门介绍 (opens new window)
  • JavaScript 教程 (opens new window)
  • ES6教程 (opens new window)
  • VUE (opens new window)
  • GIT (opens new window)
  • 学习笔记

    • 《JavaScript高级程序设计》
    • 《Vue》
    • 《React》
    • 《TypeScript 从零实现 axios》
    • TypeScript
    • JS设计模式总结
关于
GitHub (opens new window)
  • Vue》笔记

    • 基础

    • 组件

    • 过渡&动画

      • transition过渡&动画
      • 使用animate库
      • transition-group列表过渡
        • 列表的进入/离开过渡
        • 列表的排序过渡
    • 可复用性&组合

    • 工具

    • 规模化

    • Vuex

    • 其他

  • TypeScript 从零实现 axios》

  • React》笔记

  • Git》学习笔记

  • 学习笔记

  • oldNote
  • Vue》笔记
  • 过渡&动画
xugaoyi
2020-02-04
目录

transition-group列表过渡

# transition-group列表过渡

# 列表的进入/离开过渡

<transition-group tag="ul"> <!--tag转为ul-->
    <li v-for="item in list" :key="item">{{item}}</li> <!--子元素要有key-->
</transition-group>
1
2
3

注意:列表元素一定要有key

.v-enter,.v-leave-to{
  opacity: 0;
  transform: translateX(30px);
}
.v-enter-active,.v-leave-active{
  transition: all 1s;
}
1
2
3
4
5
6
7

See the Pen vue列表过渡 by xugaoyi (@xugaoyi) on CodePen.

# 列表的排序过渡

.v-move {
  transition: transform 1s;
}
1
2
3

See the Pen vue列表过渡-排序过渡 by xugaoyi (@xugaoyi) on CodePen.

列表过渡&排序过渡

See the Pen vue列表过渡&排序过渡 by xugaoyi (@xugaoyi) on CodePen.

编辑 (opens new window)
#Vue
上次更新: 2022/02/22, 09:46:22
使用animate库
Mixin混入

← 使用animate库 Mixin混入→

最近更新
01
2023工作展望xx
02-13
02
2023工作展望
02-13
03
程序员技术指南
01-18
更多文章>
Theme by Vdoing | Copyright © 2019-2023 Keys Xu | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式