fengchuanyu 1 周之前
父節點
當前提交
db7c865332
共有 4 個文件被更改,包括 70 次插入0 次删除
  1. 31 0
      5-CSS3/5_过度.html
  2. 二進制
      5-CSS3/img/slider1.jpg
  3. 二進制
      5-CSS3/img/slider2.jpeg
  4. 39 0
      5-CSS3/练习1_旋转照片.html

+ 31 - 0
5-CSS3/5_过度.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>
+        .box{
+            width: 100px;
+            height: 100px;
+            background-color: red;
+            /*transition 过度  第一个值监听哪个属性的变化 第二过度时间 第三过度方式*/
+            /* transition: width 1s linear; */
+            /* transition-property: width;
+            transition-duration: 1s;
+            transition-timing-function: linear; */
+            /* all 表示监听所有属性的变化 */
+            transition: all 1s linear;
+
+        }
+        .box:hover{
+            width: 400px;
+            background-color: blue;
+            height: 400px;
+        }
+    </style>
+</head>
+<body>
+    <div class="box"></div>
+</body>
+</html>

二進制
5-CSS3/img/slider1.jpg


二進制
5-CSS3/img/slider2.jpeg


+ 39 - 0
5-CSS3/练习1_旋转照片.html

@@ -0,0 +1,39 @@
+<!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:2px dashed black;
+            margin:300px auto;
+        }
+        .box img{
+            width: 400px;
+        }
+        .box img:first-child{
+            transform: rotate(45deg) ;
+            position: relative;
+
+        }
+        .box img:nth-child(2){
+            transform: rotate(-45deg) ;
+            position: relative;
+        }
+        .box img:hover{
+            transform: rotate(0) scale(1.5) ;
+            z-index: 2;
+        }
+    </style>
+</head>
+<body>
+    <div class="box">
+        <img src="./img/slider1.jpg" alt="">
+        <img src="./img/slider2.jpeg" alt="">
+        
+    </div>
+</body>
+</html>