fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> div { transition: all linear 0.5s; background-color: lightblue; height: 100px; } .ng-hide { height: 0; } </style> <script src="http://www.fmpq.com/jscss/jquery/1.4.6/angular.min.js"></script> <script src="http://www.fmpq.com/jscss/jquery/1.4.6/angular-animate.min.js"></script> </head> <body ng-app="myApp"> <h1>隐藏 DIV: <input type="checkbox" ng-model="myCheck"></h1> <div ng-hide="myCheck"></div> <script> var app = angular.module('myApp', ['ngAnimate']); </script> </body> </html>
运行结果