如何一次以角度显示两个图像并一次只滑动一个?

时间:2018-07-10 00:57:45

标签: javascript angular

我正在制作一个简单的角度滑块。当前在演示中,我仅显示one图像,并使用nextprevious按钮滑动一个图像以显示{{1 }}或上一张图片。

我能否每次显示next或两张图像,并单击21按钮仅滑动next或一张图像?

这是我的代码 https://stackblitz.com/edit/angular-slider-animation-gkcg99?file=src%2Fapp%2Fapp.component.ts

previous

我想在加载时显示两幅图像,并在单击@Component({ selector: 'my-app', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], animations: [trigger("move", [ state("forward", style({ transform: 'translateX(0)' })), state("backward", style({ transform: 'translateX(0)' })), state("backward-inactive", style({ transform: 'translateX(100%)' })), state("forward-inactive", style({ transform: 'translateX(-100%)' })), transition('forward => forward-inactive', [ style({ transform: 'translateX(0)' }), animate(DUR, style({ transform: 'translateX(-100%)' })) ]), transition('forward-inactive => forward, backward-inactive => forward', [ style({ transform: 'translateX(100%)' }), animate(DUR, style({ transform: 'translateX(0)' })) ]), transition('backward-inactive => backward, forward-inactive => backward', [ style({ transform: 'translateX(-100%)' }), animate(DUR, style({ transform: 'translateX(0)' })) ]), transition('backward => backward-inactive, forward => backward-inactive', [ style({ transform: 'translateX(0)' }), animate(DUR, style({ transform: 'translateX(100%)' })) ]), transition('backward => forward-inactive', [ style({ transform: 'translateX(0)' }), animate(DUR, style({ transform: 'translateX(-100%)' })) ]) ])] }) next按钮的情况下单击左右滑动一张图像

有任何更新吗?

0 个答案:

没有答案