css3动画简介以及动画库animate.css的使用
http://my.oschina.net/humaotegong/blog/406893
<!Doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>口袋硬件频道</title> <link rel="stylesheet" type="text/css" href="style/css.css"> <base target="_blank" /> <style> .d1{ width:100px;height: 100px;background-color: #000; transition: width 3s,height 3s,background-color 3s; } /* .d1:hover{ width: 400px;height: 400px;background-color: #f00; } */ .d1.on{ width: 400px;height: 400px;background-color: #f00; } </style> </head> <body> <div class="d1"> </div> <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> <script> $(function(){ $(".d1").hover(function(){ $(".d1").addClass("on"); },function(){ $(".d1").removeClass("on"); }); }); </script> </body> </html>