css - Angular CSS Animate ngbPopover 在当前位置
问题描述
我需要在弹出框出现时对其进行动画处理,基本上我想添加一个反弹动画。
问题是当动画开始时它开始于一个不是弹出框的初始或最终位置的点,所以我想让反弹动画在元素的相同位置完成。
我试图修改 transform-origin 属性,但没有结果。
// CSS Code
// ngbPopover
ul >>> .popover {
border: 2px #3f51b5;
border-bottom-right-radius: 3em;
border-bottom-left-radius: 3em;
box-shadow: 3px -2px 4px #AAA;
animation:bounce 2s linear;
}
@keyframes bounce{
1% { transform: scale(1,1);}
10% { transform: scale(1.1,.9)}
30% { transform: scale(.9,1.1) }
50% { transform: scale(1.05,.95)}
57% { transform: scale(1,1)}
64% { transform: scale(1,1)}
100% { transform: scale(1,1);}
}
// HTML Code
// Here is where the ngbPopover will shows up
<ul class="list-group">
<li class="list-group-item" #itemsRef="ngbPopover"
[ngbPopover]="popContent" popoverTitle="Detalle OT" [ngClass]="{'list-
group-item-danger': !ot.ficha}" *ngFor="let ot of ordenesTrabajo; let
i = index">
OT-{{ot.codigo}}
Ficha: {{ot.ficha}}
</li>
</ul>
//ngbPopover Content
<ng-template #popContent><b>{{infoOT}}</b></ng-template>
我想在弹出框出现的同一点开始动画。
编辑:
解决方案
推荐阅读
- centos - 从 rpm 文件递归下载所有依赖项
- java - SpringBoot:在 RestController 响应中展开子对象
- deep-learning - 带有单词输入的基于 CNN 的回归
- botframework - 如何将自定义身份验证服务器与机器人框架一起使用?
- r - tidyr Pivot-wider:重复问题
- polybase - POLYBASE ODBC 获取未实现的可选功能
- mysql - MySQL - 让用户在日期之间的位置
- excel - 带有变量或块变量的 VBA 对象未设置错误,即使已设置
- c++ - 编译器对数组声明大小的评估。什么时候发生?
- asp.net-mvc - 在 EF 上使用 Include 时,Get 方法返回 Null