fengchuanyu 8 luni în urmă
părinte
comite
6295a10a9e

+ 6 - 6
5_ES6/26_promise.html

@@ -63,12 +63,12 @@
         // })
 
 
-        Promise.resolve().then(function(){
-            console.log("成功");
-        })
-        Promise.reject().catch(function(){
-            console.log("失败");
-        })
+        // Promise.resolve().then(function(){
+        //     console.log("成功");
+        // })
+        // Promise.reject().catch(function(){
+        //     console.log("失败");
+        // })
     </script>
 </body>
 

+ 27 - 0
5_ES6/29_严格模式.html

@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+</head>
+<body>
+    <script>
+        // use strict 开启严格模式 且 只能写在当前作用域的最顶端
+        // "use strict";
+        // a = 10;
+        // console.log(a);
+        function foo(){
+            var a = 30;
+            "use strict";
+            var a = 10;
+            b = "hello";
+            console.log(a)
+        }
+        a = 20;
+        console.log(a);
+        foo()
+
+    </script>
+</body>
+</html>

+ 9 - 0
5_ES6/练习题7讲解.html

@@ -100,6 +100,15 @@
         }
         asyncFunc();
         console.log('End');
+        // start
+        // Async 1
+        // Promise 8
+        // End
+        // Async 2
+        // Timeout 7
+
+
+
     </script>
 </body>
 

+ 38 - 0
6_css3/1_css3位移.html

@@ -0,0 +1,38 @@
+<!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{
+            width: 400px;
+            height: 400px;
+            border:1px dashed black;
+            margin:100px auto;
+            position: relative;
+        }
+        .div1{
+            width: 200px;
+            height: 200px;
+            background-color: red;
+            /* transform: translateX(-100px) translateY(100px); */
+            /* transform: translate(100px,100px); */
+            /* 百分比相较于自己 */
+            /* transform: translate(50%,50%); */
+            position: absolute;
+            top:50%;
+            left: 50%;
+            /* margin-top: -100px;
+            margin-left: -100px; */
+            transform: translate(-50%,-50%);
+
+        }
+    </style>
+</head>
+<body>
+    <div class="box">
+        <div class="div1"></div>
+    </div>
+</body>
+</html>

+ 29 - 0
6_css3/2_css3缩放.html

@@ -0,0 +1,29 @@
+<!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{
+            width: 400px;
+            height: 400px;
+            border:1px dashed black;
+            margin:100px auto;
+        }
+        .div1{
+            width: 200px;
+            height: 200px;
+            background-color: red;
+            transform: scale(2);
+            /* transform-origin 变形的原点 x 和 y */
+            transform-origin: 0 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="box">
+        <div class="div1"></div>
+    </div>
+</body>
+</html>

+ 29 - 0
6_css3/3_css3旋转.html

@@ -0,0 +1,29 @@
+<!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{
+            width: 400px;
+            height: 400px;
+            border:1px dashed black;
+            margin:100px auto;
+        }
+        .div1{
+            width: 200px;
+            height: 200px;
+            background-color: red;
+            transform: rotate(45deg);
+            /* transform-origin: 50% 50%; */
+            transform-origin: 10px 100px;
+        }
+    </style>
+</head>
+<body>
+    <div class="box">
+        <div class="div1"></div>
+    </div>
+</body>
+</html>