abstract:<!DOCTYPE html><html><head><title>css浮动案例/块级元素,行内元素浮动/2019/04/21/ 19:30</title><meta charset="utf-8"><style type="text/css"> *{padding:0px
<!DOCTYPE html>
<html>
<head>
<title>css浮动案例/块级元素,行内元素浮动/2019/04/21/ 19:30</title>
<meta charset="utf-8">
<style type="text/css">
*{padding:0px;margin:0px;font-size:18px;color:#fff;}
ul li{list-style:none;}
dl dd{list-style:none;}
a:link{text-decoration:none;}
a:link{color:#fff;}
a:hover{color:#ccc;}
.head{
width:auto;
height:60px;
background-color:#000000;
}
.head-top ul li{
margin:0px 15px;
line-height:60px;
text-align:center;
float:left;
}
/* .clear{clear:both;} */
</style>
</head>
<body>
<div class="head">
<div class="head-top">
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">社区问答</a></li>
<li><a href="#">资源下载</a></li>
<li><a href="#">技术文章</a></li>
</ul>
</div>
</div>
</body>
</html>
Correcting teacher:西门大官人Correction time:2019-04-22 10:41:13
Teacher's summary:最好上传一下程序的运行效果图。float的作用是什么,如何清除浮动?为什么要清除浮动?