<!--requirements: swipe up and down, display 5 small values in a large div block, and automatically get the value of the middle position during the sliding process: 1 touchmove will be triggered multiple times; 2 Get the value of the middle position can be obtained by positioning the top value to get 3 1 to 99 for example, when sliding up and down must pay attention to the middle value, the end must be required to slide the tangent value to the middle position; When the page is displayed as 93 94 95 96 97 o'clock, when sliding up, assume that the distance between sliding divheight*5, so that the last page display will only exist 98 99, the median value will be empty; also shown as 3,4,5,6,7 , when sliding down the slide, assume that the distance between sliding divheight*5, so that the last page display will only exist 98 99, the median value will be empty; but it is important to note that the minimum and maximum values must be Middle position appears--><!doctype html>
Pure JS implementation of mobile sliding control to swipe up and down the middle position of the age as an example;