|
|
@@ -0,0 +1,72 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+ <style>
|
|
|
+ .box {
|
|
|
+ border: 3px solid black;
|
|
|
+ height: 200px;
|
|
|
+ padding: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box div {
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 200px;
|
|
|
+ color: white;
|
|
|
+ font-size: 50px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box .item {
|
|
|
+ background-color: red;
|
|
|
+ float: left;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box .item2 {
|
|
|
+ background-color: blue;
|
|
|
+ float: right;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ .box .item3{
|
|
|
+ background-color: green;
|
|
|
+ }
|
|
|
+ .box .item-left{
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .box .item-right{
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+ .box .item-center{
|
|
|
+ background-color: yellow;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div class="box">
|
|
|
+ <div class="item">1</div>
|
|
|
+ <div class="item">2</div>
|
|
|
+ <div class="item">3</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="box">
|
|
|
+ <div class="item2">1</div>
|
|
|
+ <div class="item2">2</div>
|
|
|
+ <div class="item2">3</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="box">
|
|
|
+ <div class="item3 item-left">左</div>
|
|
|
+ <div class="item3 item-right">右</div>
|
|
|
+ <div class="item3 item-center">中</div>
|
|
|
+ </div>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|