fengchuanyu 10 months ago
parent
commit
ac0611b77c
3 changed files with 184 additions and 0 deletions
  1. 42 0
      1_html/4_列表.html
  2. 81 0
      2_css/练习6_伪类选择器 copy.html
  3. 61 0
      2_css/练习6_伪类选择器.html

+ 42 - 0
1_html/4_列表.html

@@ -0,0 +1,42 @@
+<!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>
+        /* css reset */
+        *{
+            /* margin: 0;
+            padding: 0; */
+        }
+        li{
+            /* list-style: none; */
+        }
+    </style>
+</head>
+<body>
+    <!-- 无序列表 -->
+    <ul>
+        <li>1</li>
+        <li>2</li>
+        <li>3</li>
+        <li>4</li>
+    </ul>
+    <!-- 有序列表 -->
+    <ol>
+        <li>a</li>
+        <li>b</li>
+        <li>c</li>
+        <li>d</li>
+    </ol>
+    <!-- 定义列表 -->
+    <dl>
+        <dt>标题一</dt>
+        <dd>乌云在我们心里搁下一块阴影</dd>
+        <dd>乌云在我们心里搁下一块阴影</dd>
+        <dt>标题二</dt>
+        <dd>我聆听沉寂已久的心情</dd>
+    </dl>
+</body>
+</html>

+ 81 - 0
2_css/练习6_伪类选择器 copy.html

@@ -0,0 +1,81 @@
+<!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>
+        .nav-content {
+            text-align: center;
+            margin-top: 50px;
+            border-bottom: 2px solid #007bff;
+            padding-bottom: 20px;
+        }
+
+        .nav-content span {
+            font-size: 30px;
+            font-weight: bolder;
+        }
+
+        .list-content {
+            width: 600px;
+            /* border: 1px solid black; */
+            margin: 0 auto;
+        }
+
+        .list-content li {
+            width: 500px;
+            background-color: #666;
+            margin-bottom: 20px;
+            color: white;
+            padding: 20px 0 20px 20px;
+            border-radius: 10px;
+        }
+
+        .list-content li:first-child {
+            background-color: #007bff;
+        }
+
+        .list-content li:nth-child(even) {
+            background-color: #999;
+        }
+
+        .list-content li:hover {
+            background-color: #007bff;
+        }
+        /* .list-content li span:nth-child(5) {
+            color: purple;
+        } */
+    </style>
+</head>
+
+<body>
+    <div class="container">
+        <div class="nav-content">
+            <span>我的简单网页</span>
+        </div>
+        <div class="list-content">
+            <p>以下是一些列表项:</p>
+            <ul>
+                <li>
+                    <span>项目1</span>
+                </li>
+                <li>
+                    <span>项目2</span> 
+                </li>
+                <li>
+                    <span>项目3</span> 
+                </li>
+                <li>
+                    <span>项目4</span> 
+                </li>
+                <li>
+                    <span>项目5</span> 
+                </li>
+            </ul>
+        </div>
+    </div>
+</body>
+
+</html>

+ 61 - 0
2_css/练习6_伪类选择器.html

@@ -0,0 +1,61 @@
+<!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>
+        .nav-content{
+            text-align: center;
+            margin-top: 50px;
+            border-bottom: 2px solid #007bff;
+            padding-bottom: 20px;
+        }
+        .nav-content span{
+            font-size: 30px;
+            font-weight: bolder;
+        }
+        .list-content{
+            width: 600px;
+            /* border: 1px solid black; */
+            margin: 0 auto;
+        }
+        .list-content li{
+            width: 500px;
+            background-color: #666;
+            margin-bottom: 20px;
+            color: white;
+            padding: 20px 0 20px 20px;
+            border-radius: 10px;
+        }
+        .list-content li:first-child{
+            background-color: #007bff;
+        }
+        .list-content li:nth-child(even){
+            background-color: #999;
+        }
+        .list-content li:hover{
+            background-color: #007bff;
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <div class="nav-content">
+            <span>我的简单网页</span>
+        </div>
+        <div class="list-content">
+            <p>以下是一些列表项:</p>
+            <ul>
+                <li>
+                    <span>项目1</span> 
+                </li>
+                <li>项目2</li>
+                <li>项目3</li>
+                <li>项目4</li>
+                <li>项目5</li>
+            </ul>
+        </div>
+    </div>
+</body>
+</html>