<!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>页面布局</title>
<style>
a {
position: fixed;
top: 90%;
left: 90%;
}
#grandfather {
width: 1400px;
height: 760px;
margin-top: 10px;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 10px;
background-color: wheat;
border: 1px crimson solid;
position: relative;
}
#d1 {
background-color: red;
margin-left: 20px;
}
#d2 {
background-color: burlywood;
}
#d3 {
background-color: aqua;
}
#d4 {
background-color: greenyellow;
}
#d1,
#d2,
#d3,
#d4 {
width: 340px;
height: 40px;
float: left;
margin-top: 10px;
}
#d5,
#d6,
#d7 {
width: 440px;
height: 200px;
border: 1px crimson solid;
margin-left: 20px;
}
#d5 {
margin-top: 60px;
background-color: black;
}
#d6,
#d7 {
margin-top: 10px;
}
#d6 {
background-color: blue;
}
#d7 {
background-color: greenyellow;
}
#f1 {
width: 1360px;
height: 620px;
position: relative;
}
#d8 {
position: absolute;
top: 0px;
right: 20px;
width: 820px;
height: 620px;
border: 1px crimson solid;
background-color: cyan;
}
#d9 {
position: absolute;
width: 1360px;
height: 40px;
margin-top: 20px;
background-color: rgb(231, 231, 16);
right: 20px;
}
</style>
</head>
<body id="top">
</body>
<div id="grandfather">
<div id="father">
<div id="d1"></div>
<div id="d2"></div>
<div id="d3"></div>
<div id="d4"></div>
</div>
<div id="f1">
<div id="d5"></div>
<div id="d6"></div>
<div id="d7"></div>
<div id="d8"></div>
</div>
<div id="d9"></div>
</div>
<a href="#top">返回顶部</a>
</div>
</html>