【发布时间】:2010-07-05 14:31:41
【问题描述】:
我有以下代码,正如预期的那样,在 Firefox 和 IE 中都显示了一个灰色矩形。只要我在前面添加一个 DOCTYPE(HTML 4.01 过渡),它就只显示一个空白页。在线验证器说文件没问题。怎么了?我应该关心 DOCTYPE 吗?
<html>
<head>
<title>Title</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<style type="text/css">
#gallery
{
width:750;
height:548;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<div id="gallery">
</div>
</body>
</html>
【问题讨论】: