【发布时间】:2022-01-20 00:22:44
【问题描述】:
【问题讨论】:
标签: html css angular user-interface carousel
【问题讨论】:
标签: html css angular user-interface carousel
您可以使用 css 为您的轮播设置固定高度,以便轮播框始终保持相同大小:
. carousel{
height:400px;
width:300px;
或者你可以用同样的方式为你在轮播中使用的每张图片设置高度和宽度
. carousel_image{
height:400px;
width:300px;
【讨论】:
试试下面的代码:
<ngb-carousel>
<ng-template ngbSlide>
<img src="https://d2g9wbak88g7ch.cloudfront.net/bannerimages/46_inr.png" style="height:300px;width:100%">
</ng-template>
</ngb-carousel>
【讨论】: