gpt4 book ai didi

html - 如何使用 `Animate.css`到 `angular`的app?

转载 作者:太空宇宙 更新时间:2023-11-04 10:55:17 25 4
gpt4 key购买 nike

我正在尝试使用 animate.css 应用动画 bounceInUp。在显示的 div 上,但对我没有任何作用?

正确的使用方法是什么?

这是我的 CSS 代码:

.showing.ng-enter{
animation:bounceInUp 1s;
}

我的 HTML:

 <p>Hello {{name}}!</p> <button ng-click="showIt()">Show</button>
<button ng-click="hideIt()">Hide</button>
<div ng-if="show" class="showing" >I am showing something here</div>

Live Demo

最佳答案

您需要包含 animated 类和 showing

HTML

<div ng-if="show" class="animated showing" >I am showing something here</div>

CSS

.showing {
animation: bounceInUp 1s;
}

DEMO

关于html - 如何使用 `Animate.css`到 `angular`的app?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34674389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com