我不明白为什么另一个 Div 没有显示在背景之上。我需要背景来适应屏幕。
<title>The Ultimate Cube World Resource!</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
Test
</div>
<div style='position:absolute;z-index:0;left:0;top:0;width:100%;height:100%'>
<img src='img/bfg.jpg' style='width:100%;height:100%' alt='[The Ultimate Resource for
veryting Cube World! Also, we have a forum and soon a SERVER]' />
</div>
</body>
@charset "utf-8";
/* CSS Document */
#container
{
width:300px;
height:400px;
margin-right:auto;
margin-left:auto;
z-index:5;
}