The content the user left last time will be automatically restored and the website will jump to that content
P粉587780103
P粉587780103 2023-09-13 19:14:01
0
1
537

In HTML and CSS, how can I make it so that when a user leaves and reopens the page after viewing it, the page will be loaded in the paragraph that the user last focused on?

P粉587780103
P粉587780103

reply all(1)
P粉865900994

It’s impossible to do this with just HTML and CSS. But it is possible using front-end JavaScript and cookies.

Regularly save the scrollTop and scrollLeft of the main content element to the document cookie. When the document loads, parse the cookie and use the scrollTo method to resume scrolling.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template