Using scrolling is a good choice when there's more news and a limited number of times, and this chapter explains how to do this with a code example.
The code example is as follows:
The above code enables the News list scrolling effect, the following describes the implementation process:
I. Principle of realization:
The general principle is as follows, the demo element has two child elements demo1 and Demo2, and the content in the Demo1 in Demo2, the reason is to do so, in order to scroll up when the Demo2 can be connected to the back of the demo1, otherwise it will not be seamless scrolling, but the seam rolling, When the content of the demo1 is completely blocked, that is, demo1 completely rolling up, the Demo2 will happen to be in the Demo1 start scrolling position, and then reset the scrolltop value of the demo, so that scrolling back, so that the seamless scrolling effect.
Based on JS to achieve news list seamless upward scrolling instance code to introduce you here, I hope you can apply this code according to their actual needs.