Advertisement

Vue-过渡效果(Transition组件)

阅读量:
复制代码
    借用animate.css添加类名
    使用transition包裹过渡组件
    动画:
    enter-active-class = "animated xxxx类名" ---- 进入
    leave-active-class = "animated xxxx类名"  ---- 离开
    mode:
       - 新元素先进行过渡,完成后当前元素过渡离开   --- in-out
       - 当前元素先进行过渡,完成之后新元素过渡进入   --- out-in
    
    
      
      
      
      
      
      
      
      
    
复制代码
    <link href="https://cdn.bootcss.com/animate.css/3.7.2/animate.min.css" rel="stylesheet">
      <style>
    p{
      width: 100px;
      height: 100px;
      background: red;
    }
      </style>
    </head>
    <body>
      <div id="app">
    <button @click =

全部评论 (0)

还没有任何评论哟~