angularjs ngAnimate不工作
问题描述:
我使用angularjs模块ngAnimate但这一点儿也不工作,为什么我用angularjs.org相同的参考angularjs ngAnimate不工作
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<script src="https://code.angularjs.org/1.6.1/angular-animate.js"></script>
<link rel="style" href="css/style.css">
<script src="js/app.js"></script>
</head>
<body ng-app="app">
<div class="content" ng-controller="PrintCtrl">
<h4>{{title}}</h4>
<p>it's sample content welcome admin in your website</p>
</div>
</body>
var app = angular.module('app', ['ngAnimate']);
app.controller('PrintCtrl',['$scope',function($scope){
$scope.title = "The title";
}]);
答
我注意到你的CSS标签与rel =“style”链接。它应该是样式表而不是样式。如果你的CSS工作正常,我认为动画应该可以工作
+0
我改变为样式表与相同的问题? –
+0
我可以看看你的css文件吗?你有没有包含动画CSS? –
css是.content.ng-enter {0}转换:0.5s linear all; 不透明度:0; } /*输入动画的整理CSS样式*/ .content.ng-enter.ng-enter-active {opality:1; } –
您是否检查了开发者控制台的错误? –
在控制台中没有任何错误? –