当前位置: 首页 > news >正文

vue2.0-transition配合animate.css

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>智能社——http://www.zhinengshe.com</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style>
        p{
            width:100px;
            height:100px;
            background: red;
            margin:0 auto;
        }
    </style>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
    <script>
        window.onload=function(){
            new Vue({
                el:'#box',
                data:{
                    show:false
                }
            });
        };
    </script>
</head>
<body>
    <div id="box">
        <input type="button" value="点击显示隐藏" @click="show=!show">

        <transition enter-active-class="bounceInLeft" leave-active-class="bounceOutRight">
            <p v-show="show" class="animated"></p>
        </transition>
    </div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>智能社——http://www.zhinengshe.com</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style>
        p{
            width:100px;
            height:100px;
            background: red;
            margin:0 auto;
        }
    </style>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
    <script>
        window.onload=function(){
            new Vue({
                el:'#box',
                data:{
                    show:false
                }
            });
        };
    </script>
</head>
<body>
    <div id="box">
        <input type="button" value="点击显示隐藏" @click="show=!show">

        <transition enter-active-class="zoomInLeft" leave-active-class="zoomOutRight">
            <p v-show="show" class="animated"></p>
        </transition>
    </div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>智能社——http://www.zhinengshe.com</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style>
        p{
            width:100px;
            height:100px;
            background: red;
            margin:0 auto;
        }
    </style>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
    <script>
        window.onload=function(){
            new Vue({
                el:'#box',
                data:{
                    show:false
                }
            });
        };
    </script>
</head>
<body>
    <div id="box">
        <input type="button" value="点击显示隐藏" @click="show=!show">

        <transition enter-active-class="animated zoomInLeft" leave-active-class="animated zoomOutRight">
            <p v-show="show"></p>
        </transition>
    </div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>智能社——http://www.zhinengshe.com</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style>
        p{
            width:100px;
            height:100px;
            background: red;
            margin:0 auto;
        }
    </style>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
    <script>
        window.onload=function(){
            new Vue({
                el:'#box',
                data:{
                    show:false
                },
                transitions:{ //错的
                    enterActiveClass:'zoomInLeft',
                    leaveActiveClass:'zoomOutRight'
                }
            });
        };
    </script>
</head>
<body>
    <div id="box">
        <input type="button" value="点击显示隐藏" @click="show=!show">

        <transition name="transitions">
            <p v-show="show" class="animated"></p>
        </transition>
    </div>
</body>
</html>

 

相关文章:

  • LintCode 带最小值操作的栈
  • 第七 其它模块及面向对象
  • 【JavaScript】explode动画
  • 花了 4 个月整理了 50 篇 Android 干货文章
  • centos7 双网卡双ip内外网设置最小化安装
  • 移动端web app开发备忘
  • 人生最重要的三种能力,不是读书能学来的
  • 解密浏览器缓存机制
  • OGG运维优化脚本(五)-信息修改类--批量注释
  • 拥抱PBO(基于项目的组织)聚焦核心价值创造
  • awk条件语句
  • ES5新特性
  • MySQL用命令行复制表,查看表结构
  • java并发之TimeUnit理解
  • spring定时任务
  • [译]如何构建服务器端web组件,为何要构建?
  • 《用数据讲故事》作者Cole N. Knaflic:消除一切无效的图表
  • 【Leetcode】104. 二叉树的最大深度
  • 【跃迁之路】【519天】程序员高效学习方法论探索系列(实验阶段276-2018.07.09)...
  • 07.Android之多媒体问题
  • angular2 简述
  • exif信息对照
  • JavaScript 基本功--面试宝典
  • JavaScript异步流程控制的前世今生
  • Redux 中间件分析
  • SpiderData 2019年2月23日 DApp数据排行榜
  • swift基础之_对象 实例方法 对象方法。
  • vue数据传递--我有特殊的实现技巧
  • Vue小说阅读器(仿追书神器)
  • Web设计流程优化:网页效果图设计新思路
  • 高程读书笔记 第六章 面向对象程序设计
  • 基于Volley网络库实现加载多种网络图片(包括GIF动态图片、圆形图片、普通图片)...
  • 简单基于spring的redis配置(单机和集群模式)
  • 理解IaaS, PaaS, SaaS等云模型 (Cloud Models)
  • 前端学习笔记之原型——一张图说明`prototype`和`__proto__`的区别
  • Android开发者必备:推荐一款助力开发的开源APP
  • 资深实践篇 | 基于Kubernetes 1.61的Kubernetes Scheduler 调度详解 ...
  • # Swust 12th acm 邀请赛# [ E ] 01 String [题解]
  • #laravel部署安装报错loadFactoriesFrom是undefined method #
  • (2)关于RabbitMq 的 Topic Exchange 主题交换机
  • (M)unity2D敌人的创建、人物属性设置,遇敌掉血
  • (PySpark)RDD实验实战——取最大数出现的次数
  • (附源码)计算机毕业设计SSM基于java的云顶博客系统
  • (六)什么是Vite——热更新时vite、webpack做了什么
  • (十六)一篇文章学会Java的常用API
  • (转)linux下的时间函数使用
  • (转)总结使用Unity 3D优化游戏运行性能的经验
  • (自用)仿写程序
  • .net core 6 集成 elasticsearch 并 使用分词器
  • .net dataexcel 脚本公式 函数源码
  • .net 获取某一天 在当月是 第几周 函数
  • .net 无限分类
  • .NET4.0并行计算技术基础(1)
  • .NetCore实践篇:分布式监控Zipkin持久化之殇
  • .NET使用HttpClient以multipart/form-data形式post上传文件及其相关参数