1

我写了代码。我无法填写代码中的空白。为什么我做不到?

...

<style type="text/css">
...

#content
{
    margin: 0px;
    padding: 0px;
    width: 100%;
    background-color: black;
    color: white;
}

...

<div id="content">
AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>
</div>

我的网站地址是http://www.clover.lrv.jp

4

2 回答 2

0

您还需要定义您的身高。注意不要在此处以百分比添加高度。例如。添加这一行:height: 200px;在你的#content.

于 2013-08-26T03:07:42.293 回答
0

这是由于浏览器预设的边距。将其放在代码的顶部,它将重置边距和填充:

*{margin: 0; padding: 0;}
于 2013-08-26T03:10:28.990 回答