Hi, I’m using Ionic 3 and encounter these errors:
I have this virtual list, the code looks like this:
<ion-list [virtualScroll]="pageContent">
<div *virtualItem="let items" class="gallery">
<img src="{{items.img_url}}">
</div>
</ion-list>
This is the SCSS
.gallery
{
width: 110px;
height: 110px;
margin: 4px;
overflow: hidden;
display: inline-block;
float: left;
}
.gallery img
{
object-fit: cover;
width: 110px;
height: 110px;
}
It doesn’t work.
I expected this in display:
Item 1 – Item 2 – Item 3
Item 4 – Item 5
But I got this instead:
Item 1
Item 2
Item 3
Item 4
I tried to analyze, and found that the ionic generates and use transform CSS to arrange the location for each item.
How to solve the problem?
Thanks,
JR