react-sortable
Version:
Make your React components sortable.
57 lines (45 loc) • 817 B
CSS
body {
margin: 40px;
width: 620px;
font-family: arial;
font-size: 15px;
}
/* list demo */
.sortable-list {
list-style: none;
margin:0;
padding:0;
float:left;
width:200px;
background:#ddd;
}
.sortable-list li {
padding: 10px;
color: #666;
line-height: 17px;
position: relative;
-webkit-user-drag: element;
}
/* grid demo */
.sortable-grid {
padding-left: 0;
}
.sortable-grid li {
height: 111px;
width: 130px;
float: left;
color: #fff;
position: relative;
list-style: none;
-webkit-user-drag: element;
}
.sortable-grid li span {
font-size: 10px;
position: absolute;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
text-shadow: 0px 0px 2px rgba(0,0,0,0.5);
}