使用动画在ngx-bootstrap中滑动图像以获得角度5

问题描述 投票:2回答:1

我正在使用ngx-bootstrap轮播在主页中滑动我的图像。我如何用动画滑动图像?

angular5 ngx-bootstrap
1个回答
1
投票

https://github.com/valor-software/ngx-bootstrap/issues/281

在我添加的CSS组件中

.animated {
   -webkit-animation-duration: 1s;
   animation-duration: 1s;
   -webkit-animation-fill-mode: both;
   animation-fill-mode: both;
}
@-webkit-keyframes fadeIn {
  0% {opacity: 0;}
  100% {opacity: 1;}
}
@keyframes fadeIn {
  0% {opacity: 0;}
  100% {opacity: 1;}
}
.fadeIn {
  -webkit-animation-name: fadeIn;
  animation-name: fadeIn;
}

在HTML中我添加了

<carousel>
  <slide class="animated fadeIn">
    <img src="xxx.xx" class="carousel-img">
  </slide>
</carousel>
© www.soinside.com 2019 - 2024. All rights reserved.