摘要:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css">&
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin:0px;
padding:0px;
}
ul li{
width: 140px;
list-style: none;
background:#ccc;
margin:0px 4px;
float: left;
}
.box{
width:600px;
height: 800px;
border: 1px solid #ccc;
margin: 0 auto;
}
.nav{
width: 600px;
height:50px;
line-height: 50px;
text-align: center;
}
.lis{
width: 140px;
height:50px;
display: none;
position:absolute;
}
.lis p{
background: pink;
}
.new:hover .lis{
display:block;
}
.content{
width: 600px;
height:750px;
}
.box1{
width:280px;
height:700px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 20px 10px;
float:left;
}
.box2{
width:260px;
height:330px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 20px 10px;
float: right;
}
.clear{
clear:both;
}
</style>
</head>
<body>
<div>
<div>
<ul>
<li>首页</li>
<li>
<div>新闻</div>
<div>
<p>国内新闻</p>
<p>国外新闻</p>
<p>其他新闻</p>
</div>
</li>
<li>娱乐</li>
<li>论坛</li>
</ul>
<div></div>
</div>
<div>
<div>
<p>
新闻内容
</p>
</div>
<div>内容1</div>
<div>内容2</div>
</div>
</div>
</body>
</html>
批改老师:灭绝师太批改时间:2019-02-26 09:17:46
老师总结:练习的比较全面!注意事项:必要的地方必须要清除浮动哦!