TweenMax+Physics2DPlugin实现炫酷拖放文件上传粒子带进度效果代码

代码语言:html

所属分类:上传

代码描述:TweenMax+Physics2DPlugin实现炫酷拖放文件上传粒子带进度效果代码

代码标签: TweenMax Physics2DPlugin 炫酷 拖放 文件 上传 粒子 进度

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">




  <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:400,500,700&amp;display=swap'>
  
<style>
:root {
  --primary: #5628EE;
  --success: #41D071;
  --grey-light: #99A3BA;
  --grey: #6C7486;
  --grey-dark: #3F4656;
  --light: #CDD9ED;
  --lighter: #E4ECFA;
  --shadow: rgba(18, 22, 33, .1);
}

.drop {
  --r: 0rad;
  width: 380px;
  height: 420px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 24px -2px var(--shadow);
  position: relative;
}
.drop nav {
  border-bottom: 1px solid var(--lighter);
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.drop nav > svg {
  display: block;
  margin-right: 16px;
  width: 20px;
  height: 20px;
  color: var(--grey-light);
}
.drop nav ul {
  display: flex;
}
.drop nav ul:last-child {
  margin-left: auto;
}
.drop nav ul li {
  margin-bottom: -1px;
}
.drop nav ul li:not(:last-child) {
  margin-right: 16px;
}
.drop nav ul li a {
  display: block;
  font-weight: 500;
  font-size: 12px;
  line-height: 21px;
  color: var(--grey-light);
  text-decoration: none;
  padding: 12px 0 11px 0;
  border-bottom: 1px solid transparent;
}
.drop nav ul li a svg {
  width: 21px;
  height: 21px;
  display: block;
}
.drop nav ul li.active a {
  color: var(--primary);
  border-color: var(--primary);
}
.drop .center {
  --y: 52px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transition: transform 0.3s ease;
  transform: translate(-50%, var(--y));
}
.drop .center > div {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 43px;
  width: 120px;
  background: var(--primary);
  border-radius: 5px;
  transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease, opacity 0.4s ease;
  pointer-events: none;
}
.drop .center > div span,
.drop .center > div .circle, .drop .center > div > svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
}
.drop .center > div span, .drop .center > div > svg {
  color: #fff;
  transition: opacity 0.2s ease;
}
.drop .center > div span {
  font-weight: 500;
  font-size: 16px;
}
.drop .center > div > svg {
  width: 32px;
  height: 32px;
  opacity: 0;
}
.drop .center > div .circle {
  opacity: 0;
}
.drop .center > div .circle svg {
  width: 92px;
  height: 92px;
  color: var(--primary);
  display: block;
  transform: rotate(var(--r));
}.........完整代码请登录后点击上方下载按钮下载查看

网友评论0