Home > front end >  Js code sliding to the page a fixed position
Js code sliding to the page a fixed position

Time:09-27

Use js code, click on an a label, slide to the location on the page, and makes the location specified in the screen center height, and can't introduce jquery, program, or any other page will go wrong

CodePudding user response:

Rolling distance=specified location distance + screen half height
Document. The documentElement. ScrollTop
  • Related