Applet skills (jump to a specified node, the anchor effect, non-scroll-view realization)

background:

I back-end development, the recent assistance program development work in small, need to realize what type of functions in the following figure. Jump to a specified location by clicking on the event.

Implemented in a very simple HTML. Realize the general need to use srcoll-view components, and srcoll-view in achieving results, you need to specify a fixed height, which makes me a headache, because I do not know how high the final to be displayed in the applet, the dynamic calculation too much trouble. There is no other way to achieve this rolling effect? Of course yes, finally achieved. code show as below:

With such a method, it can be resolved. The highly dynamic do not need to calculate the scroll-view.

Published 21 original articles · won praise 18 · views 7575

Guess you like

Origin blog.csdn.net/love1793912554/article/details/94289856