zsydgithub 2 年之前
父節點
當前提交
ed71b13aeb
共有 3 個文件被更改,包括 153 次插入0 次删除
  1. 26 0
      7_Css3/1_test.html
  2. 95 0
      7_Css3/2_选择器.html
  3. 32 0
      7_Css3/3_css3基础.html

+ 26 - 0
7_Css3/1_test.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+  <style>
+    #div1{
+      width: 200px;
+      height: 200px;
+      background: #000;
+      border-radius: 50%;
+      /* 
+      -webkit-border-radius: 50%  为了兼容Chrome 或者 Safari
+      -moz-border-radius: 50%  为了兼容火狐浏览器
+      -0-border-radius: 50%  兼容欧朋浏览器
+      -ms-border-radius 
+      */
+    }
+  </style>
+</head>
+<body>
+  <div id="div1"></div>
+</body>
+</html>

+ 95 - 0
7_Css3/2_选择器.html

@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+  <style>
+    /* div  后面的第一个p标签 */
+    /* div + p{
+      background: red;
+    } */
+    /* div  后面所有的p标签 */
+    /* div ~ p{
+      background: red;
+    } */
+
+    /* li带有class的标签 */
+    /* li[class] {
+      background: red;
+    } */
+    /* li[class='a']{
+      background: red;
+    } */
+    
+    /* 只包含a */
+    /* li[class~='a']{
+      background: red;
+    } */
+    /* 首字母为a */
+    /* li[class^='a']{
+      background: red;
+    } */
+    /* 包含a */
+    /* li[class*='a']{
+      background: red;
+    } */
+    /* 结尾为b */
+    /* li[class$='b']{
+      background: #000;
+    } */
+
+
+    /* li:last-child{
+      background: red;
+    }
+     */
+    /* li:nth-child(4){
+      background: red;
+    } */
+    /* li:nth-child(even){
+      background: red;
+    }
+    li:nth-child(odd){
+      background: pink;
+    } */
+
+    #div1::after{
+      content: 'xixixi';
+      background: pink;
+    }
+    #div1::before{
+      content: 'hhehehehehhee';
+      background: green;
+    }
+
+  </style>
+</head>
+<body>
+  <!-- 
+    id选择符
+    元素选择符
+    class选择符
+    关系选择符
+    属性选择符
+    伪类选择符
+    伪对象选择符
+  -->
+  <p>0000000000</p>
+  <div>1111111111</div>
+  <p>22222222222</p>
+  <p>3333333333</p>
+  <p>44444444444</p>
+  <ul>
+    <li class="aa">11111</li>
+    <li class="a">22222</li>
+    <li class="ab">33333</li>
+    <li class="aa">44444</li>
+    <li class="b">555555</li>
+    <li class="ba">666666</li>
+  </ul>
+  <div id="div1">hahhahhhah</div>
+  <p>xxxxxx</p>
+</body>
+</html>

+ 32 - 0
7_Css3/3_css3基础.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+  <style>
+    #div1{
+      width: 200px;
+      height: 200px;
+      background: pink;
+      /* 强制不换行 */
+      white-space: nowrap;
+      /* 文本溢出 ... */
+      overflow: hidden;
+      text-overflow: ellipsis;
+      /* 水平  垂直   阴影的距离   颜色 */
+      text-shadow: 5px 5px 5px red;
+
+      border-radius: 10px;
+      box-shadow: 2px 10px 30px  rgb(0, 0, 0,0.5);
+
+    }
+  </style>
+</head>
+<body>
+  <div id="div1">
+    哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
+  </div>
+</body>
+</html>