search

Home  >  Q&A  >  body text

angular.js - 如何只用 AngularJs 实现图片滑动切换?

AngularJS的图片轮播效果或是图片滑动切换效果在百度上搜到的代码基本都是基于bootstrap这个控件来实现的。
如何实现纯AngularJS不带jQ或其他。实现如手机淘宝的宝贝详情页的顶层banner那样的滑动切换图片的效果?

大家讲道理大家讲道理2748 days ago786

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-15 16:53:32

    It is recommended to search a lot on github. If you plan to implement it yourself, you first need to understand the ng instructions. The rest of the principles are the same.

    1. Define a swipe command
    2. To encapsulate touch events, ng officially provides ngTouch
    3. Monitor events and use CSS control to create animation transition effects (it depends on you whether to use CSS3 or old-fashioned easing)
    4. Put it into the page and use it...

    reply
    0
  • Cancelreply