图像没有出现在Firefox中,而出现在IE8和Chrome中 [英] image does not appear in Firefox while it appears in IE8 and Chrome

查看:86
本文介绍了图像没有出现在Firefox中,而出现在IE8和Chrome中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的html文件.图片出现在Chrome和IE8中,但没有出现在Firefox中.为什么 ?谁能告诉我哪里错了? :)

I have a simple html file. Image appears in Chrome and IE8 but does not appear in Firefox. Why ? Can anyone tell me what is wrong ? :)

<html>
<head>
</head>

<body>

<img src="C:\Sunset.jpg" width="150px" height="150px" >

</body>
</html>

推荐答案

尝试使用正确 URL:

Try it with a correct URL:

<html>
<head>
</head>

<body>

<img src="file:///C:/Sunset.jpg" width="150px" height="150px" >

</body>
</html>



这将适用于FireFox(已验证),可能也适用于Chrome.
文件URL必须以模式file:///开头,并且您应始终仅使用forwared斜杠(/),而不应使用反斜杠(\).

最好的问候,
曼弗雷德(Manfred)



That''ll do for FireFox (proven) and probably Chrome too.
A file URL has to start with schema file:/// and you should always use only forwared slashes (/) instead of backward ones (\).

Best Regards,
Manfred


这篇关于图像没有出现在Firefox中,而出现在IE8和Chrome中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆