开发者

How to make a file path work that starts with root path(slash)?

开发者 https://www.devze.com 2023-03-20 15:59 出处:网络
I am working on some static pages whose file names start w开发者_JS百科ith root slash. e.g. /css/style.css

I am working on some static pages whose file names start w开发者_JS百科ith root slash. e.g. /css/style.css

The reason is, the files are part of CMS but I need to work on the static pages on my local machine without the CMS.

Is there a way to make my page work with /css/style.css without removing the root slash?

I am using Mac.

Sorry for not being clear. I am not getting the correct term for it.


You can move files to /(root dir) or install any webserver


You can try a

<base href="/" />

The other option is to use relative paths, such as

../../css/style.css
0

精彩评论

暂无评论...
验证码 换一张
取 消