我嘗試在我的模態中添加影像輪播,但輪播會根據不同的影像尺寸改變尺寸在此處輸入影像描述 在此處輸入影像描述
uj5u.com熱心網友回復:
您可以使用 css 為輪播設定固定高度,以便輪播框始終保持相同的大小:
. carousel{
height:400px;
width:300px;
或者您可以以相同的方式為您在輪播中使用的每個影像設定高度和寬度
. carousel_image{
height:400px;
width:300px;
uj5u.com熱心網友回復:
試試下面的代碼:
<ngb-carousel>
<ng-template ngbSlide>
<img src="https://d2g9wbak88g7ch.cloudfront.net/bannerimages/46_inr.png" style="height:300px;width:100%">
</ng-template>
</ngb-carousel>
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/388351.html
下一篇:將超時插入代碼但它不會創建暫停
