如何为离子 2 元素添加涟漪效应? [英] How to add ripple effect to an ionic 2 element?

查看:27
本文介绍了如何为离子 2 元素添加涟漪效应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些元素,比如按钮,在 Ionic 2 上有原生的涟漪效应.其他的像卡片没有.如何在任意 Ionic 2 元素上添加对涟漪效应的支持?

Some elements, like the button, have native ripple effect on Ionic 2. Others like cards doesn't. How could I add support to ripple effect on an arbitrary Ionic 2 element?

推荐答案

尝试像这样包装内容:

<button ion-item>
   <ion-item style="background: rgba(0,0,0,0);">Content</ion-item>
</button>

这篇关于如何为离子 2 元素添加涟漪效应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆