vue任务列表拖放拖动效果

代码语言:html

所属分类:拖放

代码描述:vue任务列表拖放拖动效果

代码标签: 拖放 拖动 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
html,
body {
  background: #0079bf;
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Droid Sans, Helvetica Neue, sans-serif;
  color: #172b4d;
}

#app {
  background: #0079bf;
  height: 100%;
  overflow-x: auto;
}

main {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding: 20px 0 30px 0;
  box-sizing: border-box;
}
main:before {
  content: '';
  float: right;
  min-width: 20px;
  width: 10px;
  height: 100%;
}
main:after {
  content: '';
  float: right;
  min-width: 20px;
  width: 10px;
  height: 100%;
}

.pane {
  display: inline-block;
  height: 100%;
  min-width: 272px;
  max-width: 272px;
  margin: 0 5px;
  border-radius: 3px;
  padding: 10px;
  box-sizing: border-box;
  background: #ebecf0;
}

.pane-header {
  font-weight: 600;
}

.pane-card {
  background: #ffffff;
  padding: 10px;
  margin: 10px 0;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.25);
  cursor: grab;
}
.pane-card:hover {
  background: #f4f5f7;
}
.pane-card.dragging {
  color: transparent;
  background: none;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  box-shadow: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  cursor: grabbing;
}

.author {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  color: #FFF;
}
.author a {
  color: inherit;
}

#ghost-card {
  position: absolute;
  user-select: none;
  pointer-events: none;
  top: 100vh;
  left: 100vw;
  opacity: 0;
  transform-origin: center;
  transform: scale(1) rotate(0);
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.25);
  transition: transform 0.04s ease-in-out;
}
#ghost-card.animate {
  transition: box-shadow 0.1s ease-in-out;
  transition: transform 0.05s ease-in-out;
}
#ghost-card.active {
  opacity: 1;
  box-shadow: 0 12px 24px -6px rgba(9, 30, 66, 0.25), 0 0 0 1px rgba(9, 30, 66, 0.08);
}
#ghost-card.leaving {
  transition: all .1s ease;
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.25);
}

.settings {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  padding: 5px 10px;
  box-sizing: border-box;
  background: #ebecf0;
  color: #172b4d;
  border-radius: 0 0 0 7px;
  max-height: 40px;
  transition: all .2s ease-in-out;
  box-shado.........完整代码请登录后点击上方下载按钮下载查看

网友评论0