When the content appears in the visual area, the corresponding navigation bar title is highlighted, how to achieve it with js?

clipboard.png
on the official website of Vue, when I scroll to the details of "declarative rendering" on the right, the title corresponding to the left directory bar is also highlighted.
tell me how to achieve this effect with js, and what is the idea.

Mar.05,2021

you can refer to this article , which is mainly to monitor the scrolling event, judge the distance


monitor the scrolling time, judge the scroll bar position, modify the element style


monitor the mouse pulley scrolling event, determine the scrolling position, and write a highlighted style. Add in

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35f37-2bfc8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35f37-2bfc8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?