<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>九宫格</title>
<style>
body{
margin: 0px;
padding:0px;
}
.uni{
width: 200px;
height: 200px;
float: left;
}
#first{
background: red;
}
#second{
background: blue;
}
#third{
background: yellow;
}
#forth{
background: black;
}
#fifth{
background: green;
}
#sixth{
background: orange;
}
#seventh{
background: brown;
}
#eighth{
background: gold;
}
#ninth{
background: pink;
}
</style>
</head>
<body>
<div style="width: 600px;height: 200px;margin: 0 auto">
<div id="first" class="uni"></div>
<div id="second" class="uni"></div>
<div id="third" class="uni"></div>
</div>
<div style="width: 600px;height: 200px;margin: 0 auto">
<div id="forth" class="uni"></div>
<div id="fifth" class="uni"></div>
<div id="sixth" class="uni"></div>
</div>
<div style="width: 600px;height: 200px;margin: 0 auto">
<div id="seventh" class="uni"></div>
<div id="eighth" class="uni"></div>
<div id="ninth" class="uni"></div>
</div>
</body>
</html>>