Angular .ng-hide-remove动画不起作用
Angular .ng-hide-remove animation doesn't work
我有这样的CSS:
#platinumHeader.ng-hide-remove {
-webkit-animation: fadeInDown 0.5s!important;
-moz-animation: fadeInDown 0.5s!important;
-o-animation: fadeInDown 0.5s!important;
animation: fadeInDown 0.5s!important;
}
这个html:
<header class="navbar-fixed-top header-floating" data-ng-show="isHeader" id="platinumHeader">
<div class="container">
...
</div>
</header>
但是当我的头显示(即isHeader设置为true),它只是出现没有动画。
但是如果我像这样写CSS(不带#platinumHeader选择器):
.ng-hide-remove {
-webkit-animation: fadeInDown 0.5s!important;
-moz-animation: fadeInDown 0.5s!important;
-o-animation: fadeInDown 0.5s!important;
animation: fadeInDown 0.5s!important;
}
很好。我哪里做错了?
尝试使用ngClass指令
<header class="navbar-fixed-top header-floating" ng-class="{'ng-hide-remove' : isHeader}" data-ng-show="isHeader" id="platinumHeader">
<div class="container">
</div>
</header>
相关文章:
- JQuery动画延长容器不起作用
- 滚动动画代码不起作用
- -webkit转换在JavaScript旋转动画中不起作用(没有JQuery)
- firefox中的CSS动画不起作用
- jQuery切换方法的动画不起作用
- 悬停不起作用时对不透明度更改进行动画处理
- j查询动画重置后事件不起作用
- 对链接的 svg 进行动画处理不起作用;内联时工作正常
- 使用动画时Jquery后退按钮不起作用
- 动画代码没有'不起作用
- SVG元素的动态动画在IE中不起作用
- 传单.markrcluster:动画不起作用
- jquery UI添加带有动画的类;不起作用
- ng重复's动画;在同一元素上使用ngInclude时不起作用
- Iframe加载动画不起作用
- HTML5-逐帧动画不起作用
- Javascript图像动画在Firefox或Internet Explorer中不起作用
- 翻转动画在Firefox上不起作用
- 输入文本的动画在firefox中不起作用
- Javascript动画不起作用