CSS层的作业代码
<html>
<head><title></title>
<style type="text/css">
body{background-image:url(作业1/3.jpg);
background-repeat:no-repeat;
}
#p1{background-color:cc0000;width:550px;
background-position:absolute;
color:white;
font-size:40px;
margin-left:50px;
margin-top:150px;
}
#p2{background-color:ff9900;width:400px;
background-position:absolute;
color:blue;
font-size:40px;
margin-left:170px;
margin-top:-260px;}
</style>
</head>
<body>
<div id="p1">
<img src="作业1/talk.GIF"><br>
Z-index=1,我是第一层我是容<br>器,可以包含图片和段落。
</div>
<div id="p2"><img src="作业1/bbs_logo.GIF"><br>
Z-index=1,我是第二层,包含图片和段落</div>
<head><title></title>
<style type="text/css">
body{background-image:url(作业1/3.jpg);
background-repeat:no-repeat;
}
#p1{background-color:cc0000;width:550px;
background-position:absolute;
color:white;
font-size:40px;
margin-left:50px;
margin-top:150px;
}
#p2{background-color:ff9900;width:400px;
background-position:absolute;
color:blue;
font-size:40px;
margin-left:170px;
margin-top:-260px;}
</style>
</head>
<body>
<div id="p1">
<img src="作业1/talk.GIF"><br>
Z-index=1,我是第一层我是容<br>器,可以包含图片和段落。
</div>
<div id="p2"><img src="作业1/bbs_logo.GIF"><br>
Z-index=1,我是第二层,包含图片和段落</div>
</body>
</html>