61,112
社区成员
发帖
与我相关
我的任务
分享
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
ul{
list-style:none;
margin:0 auto;
text-align:center;
background-color:#90F8B5}
li{
width:72px;
height:38px;
background-color:#999;
margin:15px;
float:left;}
</style>
</head>
<body>
<div>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
ul{
list-style:none;
margin:100px auto;
text-align:center;
width:600px;
height:100px;
background-color:#999;
}
li{
width:72px;
height:38px;
line-height:38px;
background-color:blue;
margin:31px;
float:left;
}
</style>
</head>
<body>
<div>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
.clearfix:after { content:"."; display:block; height:0; visibility:hidden; clear:both;font-size: 0px; }
.clearfix { zoom:1; }
div{text-align: center; background-color: #000;}
ul{
list-style:none;
margin:0 auto;
background-color:#90F8B5;
display: inline-block;
}
li{
width:72px;
height:38px;
background-color:#999;
margin:15px;
float:left;}
</style>
</head>
<body>
<div>
<ul class="clearfix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</div>
</body>
</html>