效果图
基于css浮动的小练习
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.father div{
text-align: center;
}
.father{
width: 600px;
height: 600px;
border: 1px solid black;
}
#top{
background-color: blue;
width: 400px;
height: 200px;
color: white;
float: left;
}
#left{
background-color: orange;
width: 200px;
height: 400px;
color: white;
float: left;
}
#center