How can JS achieve the effect that the page cannot be switched, similar to the effect of routing?

demo: http://m.sui.taobao.org/demos/

I just found that I can"t do this function. The links in him are all different pages. Click Jump to complete the switch on the current page, as if the page was scratched out from the right, but the URL of the browser address bar has indeed changed.

what is the core of this function?

Mar.21,2021

if you use vue-router, You will find a transition that can achieve the effect you want
ide/advanced/transitions.html-sharp%E5%8D%95%E4%B8%AA%E8%B7%AF%E7%94%B1%E7%9A%84%E8%BF%87%E6%B8%A1" rel=" nofollow noreferrer "> https://router.vuejs.org/zh/g.


history pushstate/popstate. https://www.jb51.net/html5/54.

Menu