css - 单击按钮后如何在 Ionic 5 上添加动画?
问题描述
我的代码如下,但它不起作用,我想要的是在单击按钮后激活效果。//TS
@ViewChild('icono', { read: ElementRef })icono: ElementRef;
execEffect() {
let x = this.icono
x.nativeElement.classList.add('bounce')
}
//HTML
<img #icono src="../../assets/something.png" style="width:60px;" (click)="execEffect()"/>
解决方案
推荐阅读
- python - 如何在 Orange Pi Zero 上提高 OPi.GPIO 的速度?
- google-api - Google Admin SDK Reports v1 活动:对 applicationName 组的观察中断
- docker - Docker 容器自动修复 Kubernetes 适用于一个实例吗?
- node.js - Npm 没有在安装 node.js 时自动安装
- javascript - 通过使用 Google Apps 脚本检查其他表格中的状态来更新订单状态 Google 电子表格
- browser - Helo App 用来抓取网站的用户代理是什么?
- bash - Shell Script for loop 在第一次迭代后停止(非常简单的代码)
- android - 从 Android 上的 SQLite 数据库中检索特定行 - 用于应用程序的消息传递部分
- android - IOS/Android 商店本地化的工作原理
- javascript - 使用另一个文件中的按钮