UNPKG

2.09 kBHTMLView Raw
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>Reorder animation</title>
6 <script type="text/javascript" src="build.js"></script>
7 <style>
8 body {
9 background: #fafafa;
10 font-family: sans-serif;
11 }
12 h1 {
13 font-weight: normal;
14 }
15 .btn {
16 display: inline-block;
17 cursor: pointer;
18 background: #fff;
19 box-shadow: 0 0 1px rgba(0, 0, 0, .2);
20 padding: .5em .8em;
21 transition: box-shadow .05s ease-in-out;
22 -webkit-transition: box-shadow .05s ease-in-out;
23 }
24 .btn:hover {
25 box-shadow: 0 0 2px rgba(0, 0, 0, .2);
26 }
27 .btn:active, .active, .active:hover {
28 box-shadow: 0 0 1px rgba(0, 0, 0, .2),
29 inset 0 0 4px rgba(0, 0, 0, .1);
30 }
31 .add {
32 float: right;
33 }
34 #container {
35 max-width: 42em;
36 margin: 0 auto 2em auto;
37 }
38 .list {
39 position: relative;
40 }
41 .row {
42 overflow: hidden;
43 position: absolute;
44 box-sizing: border-box;
45 width: 100%;
46 left: 0px;
47 margin: .5em 0;
48 padding: 1em;
49 background: #fff;
50 box-shadow: 0 0 1px rgba(0, 0, 0, .2);
51 transition: transform .5s ease-in-out, opacity .5s ease-out, left .5s ease-in-out;
52 -webkit-transition: transform .5s ease-in-out, opacity .5s ease-out, left .5s ease-in-out;
53 }
54 .row div {
55 display: inline-block;
56 vertical-align: middle;
57 }
58 .row > div:nth-child(1) {
59 width: 5%;
60 }
61 .row > div:nth-child(2) {
62 width: 30%;
63 }
64 .row > div:nth-child(3) {
65 width: 65%;
66 }
67 .rm-btn {
68 cursor: pointer;
69 position: absolute;
70 top: 0;
71 right: 0;
72 color: #C25151;
73 width: 1.4em;
74 height: 1.4em;
75 text-align: center;
76 line-height: 1.4em;
77 padding: 0;
78 }
79 </style>
80 </head>
81 <body>
82 <div id="container"></div>
83 </body>
84</html>