For files saved locally from other places, pay attention to 404 errors after opening them, such as js path errors, the path of the background image in css (the background image needs to be saved separately), web pages saved directly with ctrl+s will not save the css Save the background image inside. Generally, if the js, css, and image paths are all correct, there should be no problem. It does not necessarily have to be in a server environment. It’s the same as opening a web page file written by yourself directly in the browser.
First view the source code in the Chrome debugging tool, copy and paste it into a new document and save it (pay attention to the file encoding, usually utf8 without BOM)
Switch the Chrome debugging tool to the Network tab, clear the current file loading information, refresh the website, and observe the files loaded by the web page (scripts, styles, images, fonts, json and some other resource files)
Rewrite the paths of href and src of the web page source link according to the locally downloaded file resources
Be careful to remove the Google Analytics code and some social sharing codes
For files saved locally from other places, pay attention to 404 errors after opening them, such as js path errors, the path of the background image in css (the background image needs to be saved separately), web pages saved directly with ctrl+s will not save the css Save the background image inside.
Generally, if the js, css, and image paths are all correct, there should be no problem. It does not necessarily have to be in a server environment.
It’s the same as opening a web page file written by yourself directly in the browser.
Well, it needs to be run in a server environment
Four or five JS errors, how to run it?
To clone a static site, you need:
First view the source code in the Chrome debugging tool, copy and paste it into a new document and save it (pay attention to the file encoding, usually utf8 without BOM)
Switch the Chrome debugging tool to the Network tab, clear the current file loading information, refresh the website, and observe the files loaded by the web page (scripts, styles, images, fonts, json and some other resource files)
Rewrite the paths of
href
andsrc
of the web page source link according to the locally downloaded file resourcesBe careful to remove the Google Analytics code and some social sharing codes
Hope it helps you