开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜