e 1 năm trước cách đây
mục cha
commit
e2b96092e9

+ 87 - 0
css3/13.网站.html

@@ -0,0 +1,87 @@
+<!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>
+        * {
+            margin: 0;
+            padding: 0;
+            list-style: none;
+            text-decoration: none;
+            box-sizing: border-box;
+        }
+        #box {
+            display: flex;
+            flex-direction: column;
+        }
+        #header {
+            width: 100%;
+            height: 58px;
+            background: #00f;
+        }
+        #header .container {
+            width: 1200px;
+            height: 100%;
+            background: #0f0;
+            margin: 0 auto;
+            display: flex;
+        }
+        #header .container .logo {
+            width: 138px;
+            height: 40px;
+            background: #ff0;
+            background: url('./images/1.png');
+            margin-top: 18px;
+        }
+        #header .container .nav {
+            width: 514px;
+            height: 100%;
+            background: plum;
+        }
+        #header .container .nav ul {
+            width: 100%;
+            height: 100%;
+            display: flex;
+            align-items: center;
+            justify-content: space-around;
+        }
+        #header .container .nav ul li {
+            /* flex: 1; */
+        }
+        #main {
+            width: 100%;
+            flex: 1;
+            background: #f00;
+        }
+        #footer {
+            width: 100%;
+            height: 647px;
+            background: #ff0;
+        }
+    </style>
+</head>
+<body>
+    <div id="box">
+        <div id="header">
+            <div class="container">
+                <div class="logo"></div>
+                <div class="nav">
+                    <ul>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                        <li><a href="">首页</a></li>
+                    </ul>
+                </div>
+            </div>
+        </div>
+        <div id="main">main</div>
+        <div id="footer">footer</div>
+    </div>
+</body>
+</html>

+ 31 - 0
css3/14.盒子水平垂直居中1.html

@@ -0,0 +1,31 @@
+<!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>
+        * {
+            margin: 0;
+            padding: 0;
+        }
+        html,body {
+            width: 100%;
+            height: 100%;
+        }
+        body {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+        #box {
+            width: 200px;
+            height: 200px;
+            background: #00f;
+        }
+    </style>
+</head>
+<body>
+    <div id="box"></div>
+</body>
+</html>

+ 31 - 0
css3/15.盒子水平垂直居中2.html

@@ -0,0 +1,31 @@
+<!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>
+        * {
+            margin: 0;
+            padding: 0;
+        }
+        html,body {
+            width: 100%;
+            height: 100%;
+        }
+        #box {
+            width: 200px;
+            height: 200px;
+            background: #f00;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            margin-top: -100px;
+            margin-left: -100px;
+        }
+    </style>
+</head>
+<body>
+    <div id="box"></div>
+</body>
+</html>

BIN
css3/images/1.png