html – meteor app:图片无法加载

html – meteor app:图片无法加载,第1张

概述我正在用流星制作一个简单的聊天应用程序.我的HTML是: <body> <h1 align="center">tomomi-chat</h1> <img src="original.gif"> <div class="container" align="center"> {{>entryfield}} </div> <br> <div cla 我正在用流星制作一个简单的聊天应用程序.我的HTML是:
<body>    <h1 align="center">tomomi-chat</h1>    <img src="original.gif">    <div  align="center">    {{>entryfIEld}}    </div>    <br>    <div >    {{>messages}}    </div>

图像不会加载到本地服务器上.由于应用程序非常简单,除了目录中的“.meteor”文件夹之外没有其他文件夹. .Js,.CSS和.HTML文件都在app目录中.

即使我托管图像并使用外部链接,结果也一样.为什么流星阻挡我的应用程序中的图像?

部署:http://tomomi.meteor.com/

解决方法 您应该在应用程序根文件夹中创建一个名为public的文件夹.

从Meteor documentation:

/public

files in /public are served to the clIEnt as-is. Use this to store assets such as images. For example,if you have an image located at /public/background.png,you can include it in your HTML with or in your CSS with background-image: url(/background.png). Note that /public is not part of the image URL.

总结

以上是内存溢出为你收集整理的html – meteor app:图片无法加载全部内容,希望文章能够帮你解决html – meteor app:图片无法加载所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1106947.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存