【发布时间】:2012-04-28 13:08:41
【问题描述】:
我遇到了这个问题,我不知道为什么会这样......
以下面的html为例,它会按照CSS的指示显示部分的灰色区域。但是,当我在第一行中包含 <!Doctype html> 时,它会崩溃。此外,下面的代码在 IE9 中根本不起作用。为什么?
非常感谢。
<html>
<head>
<style type="text/css">
.sec_class{
width:50%;
height:15%;
border:1px black solid;
padding:0px;
position:relative;
background-color:grey;
}
</style>
</head>
<body>
<section class = 'sec_class'></section>
<section class = 'sec_class'></section>
<section class = 'sec_class'></section>
</body>
</html>
【问题讨论】: