animate.css使用教程

1.基本用法,使用link引入

<head>
<link rel="stylesheet" herf="animate.min.css">
</head>

 给你想添加动画效果的元素添加一个 animated 类(必需)。如果需要动画循环运动,你还需要给这个元素追加 infinite 类,又或者自己另外定义一个类似于 infinite 的类。

添加效果可以去官网上选取,还有相应的动画效果 https://daneden.github.io/animate.css/

实现代码:

<h1 class="animated infinite bounce">Example</h1>

2.jQuery 基本用法

$('#yourElement').addClass('animated bounceOutLeft');

3.在Vue-cli中的实现方式

下载animate

npm install animate --save

在main.js内引用

import animated from 'animate.css'

Vue.use(animated)

在需要使用动画的组件中写入

 <transition
      enter-active-class="animated bounceInRight"
      leave-active-class="animated bounceOutRight"
    >
     组件名称
    </transition>

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值