Is there any plug-in that can achieve this effect better?
This is a ul. The content beyond the ul can be slid left and right, whichever tab is clicked, which tab slides to the middle.
曾经蜡笔没有小新2017-05-16 13:39:06
This effect is actually a carousel, you can try swiper.js [http://www.swiper.com.cn/]
習慣沉默2017-05-16 13:39:06
Mobile version: http://hammerjs.github.io/
desktop: I have never seen this effect
伊谢尔伦2017-05-16 13:39:06
If you don’t need a plug-in to implement it, use p+float. The parent container gives width: 1000px, overflow: auto, and just beautify the scroll bar. I hope you will adopt it
阿神2017-05-16 13:39:06
Try swiper.js. It specializes in carousel events. Various effects are already built-in.
In addition, if you want to make a single page slide on the first screen of the mobile terminal, you can try zepto.fullPage.js.
As for the touch events on the mobile side, zepto.js itself also has some basic built-in ones. If you need more advanced ones, you can use hammer.js or AlloyFinger.js
为情所困2017-05-16 13:39:06
I feel like you can refer to Tmall’s must-grab modules for this module. Check out Alibaba’s open source solution Flexible to see if there are any corresponding tutorials
phpcn_u15822017-05-16 13:39:06
You can write your own~ It is recommended to use swiper.js for carousel, fullpage.js and slider.js. Use whichever one you like
伊谢尔伦2017-05-16 13:39:06
Swiper has done it, and the touch event in html5 can also be implemented