GeezerVison is showing github.com — animate.css · codeChun/javaScript@4f2df9f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: animate.css/.idea/.name +1Lines changed: 1 addition & 0 deletions Collapse file
Copy file name to clipboard File renamed without changes.
Collapse file
Copy file name to clipboardExpand all lines: animate.css/.idea/encodings.xml +6Lines changed: 6 additions & 0 deletions Collapse file
Copy file name to clipboardExpand all lines: animate.css/.idea/misc.xml +13Lines changed: 13 additions & 0 deletions Collapse file
Copy file name to clipboardExpand all lines: animate.css/.idea/modules.xml +8Lines changed: 8 additions & 0 deletions Collapse file
Copy file name to clipboardExpand all lines: animate.css/.idea/workspace.xml +291Lines changed: 291 additions & 0 deletions Collapse file
Copy file name to clipboard +41Lines changed: 41 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>Title</title> |
| 6 | + <link rel="stylesheet" href="css/animate.min.css"> |
| 7 | + <style> |
| 8 | + *{ |
| 9 | + margin: 0; |
| 10 | + padding: 0; |
| 11 | + } |
| 12 | + #login{ |
| 13 | + width: 300px; |
| 14 | + height: 300px; |
| 15 | + border: 1px solid red; |
| 16 | + } |
| 17 | + .animated.tada{ |
| 18 | + -webkit-animation-duration:.3s; /*可以在这里改动画的持续时间,延迟时间和执行次数等*/ |
| 19 | + } |
| 20 | + </style> |
| 21 | +</head> |
| 22 | +<body> |
| 23 | +<div id="login"> |
| 24 | + <input type="text"> |
| 25 | + <button>登录</button> |
| 26 | +</div> |
| 27 | +</body> |
| 28 | +<script src="js/jquery-1.9.1.min.js"></script> |
| 29 | +<script> |
| 30 | +// git地址:https://github.com/daneden/animate.css |
| 31 | + $('button').on('click',function(){ |
| 32 | + var $login=$('#login'); |
| 33 | + var name= $.trim($('input').val()); |
| 34 | + if(name==''){ |
| 35 | + $login.addClass('animated tada').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){ |
| 36 | + $(this).removeClass('animated tada'); |
| 37 | + }); //one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){}相当于回调 |
| 38 | + } |
| 39 | + }); |
| 40 | +</script> |
| 41 | +</html> |