gpt4 book ai didi

css - 调整卡片内图像的大小

转载 作者:行者123 更新时间:2023-11-28 04:13:13 24 4
gpt4 key购买 nike

我正在开发一个 Ionic 应用程序,但我遇到了问题,里面有图像。我得到了一张我想要的固定尺寸的卡片,我想在里面放一张图片。我添加了图像(大小为 400x400),但我无法调整它的大小以适合卡片。这是代码:

   page-home {
ion-card{
min-height: 47%;
max-height: 47%;
}

.itemImage{
padding: 2px;
max-height: 10%;
}
}
 <ion-content>

<ion-card>
<div class="itemImage">
<img src="assets/img/placeholder.png">
</div>
</ion-card>

<ion-card>
</ion-card>

</ion-content>



它是这样的:as you can see it take the whole card

最佳答案

将 width:100% 添加到 .itemImage 和 .itemImage >img。

关于css - 调整卡片内图像的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42611088/

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