Introduction to AngularJS
AngularJS Tutorial
Add this libraray in script tag:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-animate.js"></script>
<style> .ani { transition: all linear 0.5s; background-color: lightblue; height: 100px; width: 400px; position: relative; top: 0; left: 0; }
.ng-hide { height: 0; width: 0; background-color: transparent; top:-200px; left: 200px; } </style> <body ng-app="ngAnimate"> <h4>Animate <input type="checkbox" ng-model="myCheck"></h4> <div class="ani" ng-hide="myCheck"></div> </div>