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?
相关问题
- Is there any way to make the background of a 3D-mo
- render Problem Path.op() not supported in latest m
- How to disable ripple effect on long press of a bu
- How to use ngModel in ion-checkbox?
- How to hide nav-bar with tabs in Ionic 2?
相关文章
- Why should I start using Google Material Design Li
- How i can set Half Expanded state for my BottomShe
- How to give fixed height to Angular Material Table
- What does TranslationZ actually do in Android?
- Ionic conditional class css
- Android Manifest Merger fails after adding Depende
- After reseting plugins, Ionic 2 program doesn'
- How to create or customize a Toast view using ioni
As I see by sources of Ionic v3.3, a container element must contain an empty
div
element withbutton-effect
class, also the container must havetappable
attribute and be styled asposition: relative; overflow: hidden
.In my project I use a following directive to style button-like containers:
Try wrapping the content like this:
For IONIC 4 you can now use like this:
Make sure you div position is relative.
:)
You need to use the
button
element and you can still have the ion-item directive:From:
To:
A more complete example based on the answer of Bartosz Kosarzycki: