|
@@ -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>
|