[英]Content type of stylesheet in Meteoor
I am trying to set: 我正在尝试设置:
body{ background-image: url('/assets/bg.png') }
But Im getting this warning: 但我收到此警告:
Resource interpreted as Image but transferred with MIME type text/html
Not sure how to fix it. 不知道如何解决它。
But Im getting this error :
但是我收到此错误 :
Thats not an error thats a warning message 多数民众赞成不是错误,多数民众赞成在一条警告消息
did you have that bg.png
on the appNAme/public
? 您在
appNAme/public
上有那个bg.png
吗?
in this SO @sohel khalifa explain why you get this warning message. 在此 @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.
这是Chrome生成的内容不安全警告,表示服务器在HTTP标头中发送了错误或丢失的Content-type。 Sometimes this also happens when loading custom Javascript or CSS, etc.
有时在加载自定义Javascript或CSS等时也会发生这种情况。
This is how you app structure should look alike. 这就是您的应用程序结构应具有的外观。
appName/public
appName/public/assets
with that just call like this. 像这样打电话。
background-image: url('/assets/bg.png')
note 注意
Everything in /public
should start map with /
/public
都应以/
开头
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.