forked from wwmin/JavaScript30
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflex1.html
More file actions
68 lines (65 loc) · 1.9 KB
/
flex1.html
File metadata and controls
68 lines (65 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>flex 布局</title>
<style>
.flex{
/*基本样式*/
width:350px;
height:200px;
border:1px solid #555;
font:14px Arial;
/*简历弹性框*/
display: -webkit-flex;
-webkit-flex-direction: row;
display: flex;
flex-direction:row;
}
.flex > div{
-webkit-webkit-flex: 1 1 auto;
-moz-webkit-flex: 1 1 auto;
-ms-webkit-flex: 1 1 auto;
-o-webkit-flex: 1 1 auto;
webkit-flex: 1 1 auto;
flex:1 1 auto;
width:30px;/* 让过渡表现良好。(从/到"width:auto"的过渡
至少在 Gecko 和 Webkit 上是有 bug 的。
更多信息参见 http://bugzil.la/731886 ) */
-webkit-webkit-transition: width 0.7s ease-out;
-moz-webkit-transition: width 0.7s ease-out;
-ms-webkit-transition: width 0.7s ease-out;
-o-webkit-transition: width 0.7s ease-out;
webkit-transition: width 0.7s ease-out;
-webkit-transition: width 0.7s ease-out;
-moz-transition: width 0.7s ease-out;
-ms-transition: width 0.7s ease-out;
-o-transition: width 0.7s ease-out;
transition: width 0.7s ease-out;
}
/*colors*/
.flex > div:nth-child(1){
background: #009246;
}
.flex > div:nth-child(2){
background: #F1F2F1;
}
.flex > div:nth-child(3){
background: #CE2B37;
}
.flex > div:hover{
width:200px;
}
</style>
</head>
<body>
<div>
<p>Flexbox nuovo</p>
<div class="flex">
<div>numo</div>
<div>due</div>
<div>tre</div>
</div>
</div>
</body>
</html>