Meteoor 中样式表的内容类型
Content type of stylesheet in Meteoor
我正在尝试设置:
body{
background-image: url('/assets/bg.png')
}
但是我收到了这个警告:
Resource interpreted as Image but transferred with MIME type text/html
不确定如何解决。
But Im getting this error:
那不是错误,那是警告消息
你在 appNAme/public
上有那个 bg.png
吗?
在 this SO @sohel khalifa 解释为什么你会收到此警告消息。
This is the insecure content warning generated by Chrome, saying that
the server is sending wrong or missing Content-type in HTTP header.
Sometimes this also happens when loading custom Javascript or CSS,
etc.
这就是您的应用结构应该看起来的样子。
appName/public
appName/public/assets
这样就可以调用了。
background-image: url('/assets/bg.png')
注意
/public
中的所有内容都应以 /
开始映射
我正在尝试设置:
body{
background-image: url('/assets/bg.png')
}
但是我收到了这个警告:
Resource interpreted as Image but transferred with MIME type text/html
不确定如何解决。
But Im getting this error:
那不是错误,那是警告消息
你在 appNAme/public
上有那个 bg.png
吗?
在 this SO @sohel khalifa 解释为什么你会收到此警告消息。
This is the insecure content warning generated by Chrome, saying that the server is sending wrong or missing Content-type in HTTP header. Sometimes this also happens when loading custom Javascript or CSS, etc.
这就是您的应用结构应该看起来的样子。
appName/public
appName/public/assets
这样就可以调用了。
background-image: url('/assets/bg.png')
注意
/public
中的所有内容都应以 /