我有一个图像列表,其中使用* ngFor将其显示为滑块,如下所示:
<div class="row">
<div class="col-md-1">
<button>Prev</button>
</div>
<div class="col-md-8 thumbnail-section">
<div *ngFor="let img of imagesUrl; let i = index" (click)="setClickedRow(i)" [class.active]="i == selectedRow"
class="thumbnail-div">
<img src="{{img}}" class="thumb-img" (click)="selectedContent(img)">
</div>
</div>
<div class="col-md-1">
<button>Next</button>
</div>
</div>
如何在单击上一个和下一个按钮时水平滚动元素?