gpt4 book ai didi

ionic-framework - 将 替换为 并且图像非常小

转载 作者:行者123 更新时间:2023-12-05 06:40:11 24 4
gpt4 key购买 nike

我遵循了 virtual scroll 的指导并将我的列表更新为虚拟列表。

一切都很好,但是当我转换 card background images来自 <img><ion-img>在我的卡片中显示为背景图片的图片非常小。有什么我想念的吗?

最佳答案

检查 Image dimensions sectionion-img 文档中。

By providing image dimensions up front, Ionic is able to accurately size up the image's location within the viewport, which helps lazy load only images which are viewable. Image dimensions can either by set as properties, inline styles, or external stylesheets. It doesn't matter which method of setting dimensions is used, but it's important that somehow each ion-img has been given an exact size.

如果您使用 ion-img,则需要通过属性或 css 样式设置要显示的图像的高度和宽度。

关于ionic-framework - 将 <img> 替换为 <ion-img> 并且图像非常小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43273352/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com