csspress
This commit is contained in:
@@ -1,36 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- -->
|
||||
<html lang="en">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<title>
|
||||
盒子模型
|
||||
</title>
|
||||
<style>
|
||||
.box{
|
||||
width: 900px;
|
||||
height: 600px;
|
||||
background:orange;
|
||||
}
|
||||
.item1{
|
||||
width: 40%;
|
||||
height:80%;
|
||||
background: paleturquoise;
|
||||
float: left;
|
||||
}
|
||||
.item2{
|
||||
width:40%;
|
||||
height: 80%;
|
||||
background: blue;
|
||||
float: right;
|
||||
}
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
body{
|
||||
text-align:center;
|
||||
}
|
||||
div{
|
||||
width:200px;
|
||||
height:200px;
|
||||
margin:0 auto;
|
||||
}
|
||||
#div1{
|
||||
margin-top:10px;
|
||||
background:red;
|
||||
}
|
||||
#div11{
|
||||
margin-top:20px;
|
||||
width:0;
|
||||
height:0;
|
||||
background:yellow;
|
||||
}
|
||||
#div12{
|
||||
margin-top:30px;
|
||||
width:50px;
|
||||
height:50px;
|
||||
background:blue;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="item1"></div>
|
||||
<div class="item2"></div>
|
||||
</div>
|
||||
<div id="div1">
|
||||
<div id="div11"></div>
|
||||
<div id="div12"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user