HTML / CSS:Image / div没有出现在Mozilla,但在IE? [英] HTML/CSS: Image/div is not appearing in Mozilla but is in IE?
本文介绍了HTML / CSS:Image / div没有出现在Mozilla,但在IE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
无法弄清楚为什么图片没有出现Mozilla而只是在IE中显示div容器。任何人都知道任何解决方案?
Can't figure out why the image is not appearing Mozilla while just showing the div container in IE. Anyone know of any solutions?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Featured</title>
</head>
<body>
<!--#include virtual="/header.html" -->
<!--#include virtual="/alpha.html" -->
<div id="WhiteBody">
<center>
<p class="HeaderFont">FEATURED</p>
</center>
<div style=background-color:#D9BA26; height:480px; width:320px; >
<img src="images/Magic Hat #9.jpg" style=width:100%;height:100%; />
</div>
</div>
<!--#include virtual="/alpha.html" -->
<!--#include virtual="/footer.html" -->
</body>
</html>
推荐答案
You need quotes around your CSS properties
<div id="WhiteBody">
<center>
<p class="HeaderFont">FEATURED</p>
</center>
<div style="background-color:#D9BA26; height:480px; width:320px;" >
<img src="images/Magic Hat #9.jpg" style="width:100%;height:100%;" />
</div>
</div>
并尝试避免在图片名称中使用空格和特殊字符 - 使其 Magic_Hat_9.jpg
and try to avoid using whitespaces and special chars in your images names - make it Magic_Hat_9.jpg
这篇关于HTML / CSS:Image / div没有出现在Mozilla,但在IE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文