现在的位置: 首页 > 操作系统 > 正文

AngularJS入门之动画

2020年02月10日 操作系统 ⁄ 共 763字 ⁄ 字号 评论关闭
文章目录

AngularJS中ngAnimate模块支持动画效果,但是ngAnimate模块并未包含在AngularJS核心库中,因此需要使用ngAnimate需要在定义Module时声明对其的引用。

AngularJS中实现动画效果有两大种方式:

基于CSS的动画效果CSS TransitionAnimationCSS Class-based Animation基于Javascript的动画效果

官方给出的能支持动画效果的Directives:

Directive Supported Animations

ngRepeatenter, leave and movengViewenter and leavengIncludeenter and leavengSwitchenter and leavengIfenter and leavengClassadd and remove (the CSS class(es) present)ngShow&ngHideadd and remove (the ng-hide class value)form&ngModeladd and remove (dirty, pristine, valid, invalid & all other validations)ngMessagesadd and remove (ng-active & ng-inactive)ngMessageenter and leave

基于CSS的动画效果:

1. CSS Transition Animation

示例1(官方Demo):

以上就上有关AngularJS入门之动画的相关介绍,要了解更多AngularJS入门,AngularJS,AngularJS入门之动画,编程,Linux编程,Linux Shell,Android,Android教程,JAVA,C语言,Python,HTML5内容请登录学步园。

抱歉!评论已关闭.