e il y a 1 an
Parent
commit
973eea1241

BIN
day3/images/R-C.jpg


BIN
day3/images/img01.gif


BIN
day3/images/img01.jpeg


BIN
day3/images/img02.jpeg


BIN
day3/images/img03.jpeg


BIN
day3/images/img04.jpeg


+ 47 - 0
day3/常用样式.html

@@ -0,0 +1,47 @@
+<!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 {
+            /* 像素 px */
+            /* 宽度 width */
+            /* 高度 height */
+            /* 颜色 color */
+            /* 背景色 background-color/background */
+            /* 背景 background */
+            /* 背景图片 background-image:url("引入图片路径") */
+            /* 背景平铺 background-repeat:
+                no-repeat 不平铺
+                repeat-x 横向平铺
+                repeat-y 纵向平铺
+                repeat 平铺
+            */
+            /* 背景尺寸 background-size
+                cover 全覆盖
+                contain 等比例放大
+            */
+            /* 
+                背景位置 background-position
+                1.x轴 y轴
+                2.right/left top/bottom                  
+            */
+            width: 300px;
+            height: 300px;
+            color: red;
+            background-image: url("./images/img01.gif");
+            /* background:yellowgreen; */
+            /* background-color: yellow; */
+            background-repeat: no-repeat;
+            /* background-size: cover; */
+            background-position:200px;
+            
+        }   
+    </style>
+</head>
+<body>
+    <div class="box"></div>
+</body>
+</html>

+ 1 - 2
day3/选择器.html

@@ -151,8 +151,7 @@
         <h5>h5</h5>
         <span>span1</span>
         <div>
-            
-        <span>span2</span>
+            <span>span2</span>
         </div>
         <div>
             <p>123</p>

+ 43 - 0
day3/选择器的优先级.html

@@ -0,0 +1,43 @@
+<!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>
+        /* div {
+            color: aqua !important;
+        } */
+        #word {
+            color: #ff0;
+        }
+        ul li:first-child{
+            color: red;
+        }
+        /* .text {
+            color: blue;
+        } */
+        ul li:first-child {
+            color: #ff0;
+        }
+        div {
+            color: aquamarine;
+        }
+    </style>
+</head>
+<body>
+    <div  class="text">这个文字</div>
+    <!-- <ul>
+        <li class="text">1</li>
+        <li>2</li>
+        <li>3</li>
+        <li>4</li>
+    </ul> -->
+    <!-- 
+        css选择器层级及权重:
+
+        !important >内联样式(style)> id选择器 >类选择器(class)= 伪类选择器 = 属性选择器 > 标签选择器
+   权重:   正无穷     1,0,0,0          0,1,0,0           0,0,1,0                          0,0,0,1
+     -->
+</body>
+</html>