划重点
- 动画:transition
- transition-group :数组动画
- 数组的 添加 / 删除
豆腐粉丝汤 清淡又健康
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="./lib/vue-2.6.10.js"></script>
<style>
li {
border: 1px dashed #999;
margin: 5px;
padding-left: 10px;
line-height: 35px;
width: 100%;
}
.v-enter,
.v-leave-to {
opacity: 0;
transform: translateY(80px);
}
.v-enter-active,
.v-leave-active {
transition: all 0.8s ease
}
/* hover: 设置鼠标经过 */
li:hover {
background-color: red
}
/*
下面