<! DOCTYPE html>Type:none;} . bb{transition:all 1s; } </style>/*Determine whether this style is used by comparing this parameter*/--<ul ng-style= "ULS" style= "width:2160px;position:relative; overflow:hidden; padding:0px; margin:0px ;"ng-class=" {Bb:1==see} > <!--loop traversal lis--> <li ng-style= "AA" style= "float:left; width:540px; "ng-repeat=" Item in LIS "> </li> </ul> </div></body><script language= "JavaScript" >varApp = Angular.module ("myApp", []); App.controller ("Myctrl",function($scope) {$scope. Lis= [ {"img": ". /image/slide1.jpg "}, {"img": ". /image/slide2.jpg "}, {"img": ". /image/slide3.jpg "}] $scope. ULS= {"Left": "0px"}; varIndex=0; $scope. See=1; varLl=0; SetInterval (function() {$scope. $apply (function(){//If you modify the data in SetInterval or other JS-like methods, you need to manually update it via apply. varlv=parseint ($scope. Uls.left); if(index==2){ if(ll==2) {$scope. Lis= [ {"img": ". /image/slide3.jpg "}, {"img": ". /image/slide1.jpg "}, {"img": ". /image/slide2.jpg "} ] }Else if(ll==4) {$scope. Lis= [ {"img": ". /image/slide2.jpg "}, {"img": ". /image/slide3.jpg "}, {"img": ". /image/slide1.jpg "} ] }Else if(ll==6) {$scope. Lis= [ {"img": ". /image/slide1.jpg "}, {"img": ". /image/slide2.jpg "}, {"img": ". /image/slide3.jpg "}] ll=0; } console.log (LL); $scope. See=0; Index=0; LV=0; }Else{$scope. see=1;lv-=540;index++;ll++;} $scope. Uls.left= lv+ "px"; }) },1500); });</script>JS: Using angular to achieve gallery effect