Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ionic - Responsive ion-img

$
0
0

@royibernthal wrote:

I have a virtual scroll using ion-list and ion-item.

Each ion-item contains ion-img for performance reasons.

Images need to be scaled responsively, their dimensions need to be defined in % in css.

How do I make ion-img responsive?

I suppose I could possibly style it like a normal img (assuming the ion-img component supports that), but I need to provide approxItemWidth and approxItemHeight as well, which can only be specified in px.

Is there a way to set approxItemWidth and approxItemHeight in % or some other way to approach this issue?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>