1)打开终端并输入
npm install -g http-server
2)转到您想要为您提供文件的根文件夹并键入:
http-server ./
3)读取终端的输出,会出现类似 http://localhost:8080 的内容。
background: url(‘http://localhost:8080/waw.png’); background: url(‘http://localhost:8080/waw.png’) ;