是否可以从另一台服务器导入 css 文件?假设我在 www.mysite.com 上有我的 html,我可以像这样导入我的 css 吗?
<link href="www.anothersite.com/style.css" rel="stylesheet" type="text/css" />
最佳答案
是的,任何完整的 url 都对 css 有效。不过,您需要包含 http://。
<link href="http://www.anothersite.com/style.css" rel="stylesheet" type="text/css" />
关于从另一台服务器导入css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1645860/