Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 图像在firefox中不显示,而在google chrome中显示_Html_Css_Google Chrome_Firefox - Fatal编程技术网

Html 图像在firefox中不显示,而在google chrome中显示

Html 图像在firefox中不显示,而在google chrome中显示,html,css,google-chrome,firefox,Html,Css,Google Chrome,Firefox,我用chorme显示图像,效果很好。但当它在firefox中显示时,它并没有正确显示。我所做的请给我建议并帮助我我还使用了reset.css文件删除浏览器样式,但仍然存在相同的问题。这里没有人能在不看到正在执行的代码的情况下帮助您解决问题。但这里有两种解决方案可以解决您的问题: 1) 在写入图像路径时,请确保使用正斜杠/而不是反斜杠\ Correct: <img src="/images/sample.png"> Incorrect: <img src="\images\sa

我用chorme显示图像,效果很好。但当它在firefox中显示时,它并没有正确显示。我所做的请给我建议并帮助我我还使用了reset.css文件删除浏览器样式,但仍然存在相同的问题。

这里没有人能在不看到正在执行的代码的情况下帮助您解决问题。但这里有两种解决方案可以解决您的问题:

1) 在写入图像路径时,请确保使用正斜杠
/
而不是反斜杠
\

Correct: <img src="/images/sample.png"> 
Incorrect: <img src="\images\sample.png">
正确:
不正确:
2) 删除路径文件夹名称开头的两个点(如果有的话)

<img src="../images/sample.png">


请展示一些代码,如果没有它,就无法猜测您的问题可能是什么。我建议您通过代码验证程序运行它,以排除任何代码错误。您可以在此处发布代码吗