svg+css实现带进度提示上传动画效果代码

代码语言:html

所属分类:上传

代码描述:svg+css实现带进度提示上传动画效果代码

代码标签: 进度 提示 上传 动画 效果

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

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

<head>
    <meta charset="UTF-8">
    <style>
        @import url(https://fonts.googleapis.com/css?family=Lato);
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      font-family: Lato, sans-serif;
      background: #eceffc;
    }
    
    .upload {
      --btn-color: #3bafda;
      --progress-color: #2d334c;
      --ease-in-out-quartic: cubic-bezier(0.77, 0, 0.175, 1);
      position: relative;
      display: flex;
      font-size: 24px;
      background: white;
      border-radius: 10px;
      box-shadow: 0 1.7px 1.4px rgba(0, 0, 0, 0.02), 0 4px 3.3px rgba(0, 0, 0, 0.028), 0 7.5px 6.3px rgba(0, 0, 0, 0.035), 0 13.4px 11.2px rgba(0, 0, 0, 0.042), 0 25.1px 20.9px rgba(0, 0, 0, 0.05), 0 60px 50px rgba(0, 0, 0, 0.07);
      overflow: hidden;
    }
    .upload__info {
      display: flex;
      align-items: center;
      padding: 25px 30px;
      margin-right: 60px;
    }
    .upload__filename {
      padding-left: 12px;
    }
    .upload__button {
      position: relative;
      padding: 20px 20px;
      font-size: 24px;
      color: white;
      background: none;
      border: none;
      border-radius: inherit;
      outline: none;
      cursor: pointer;
      transform: scale(0.9);
    }
    .upload__button::before {
      position: absolute;
      content: "";
      z-index: -1;
      top: 0;
      left: 2px;
      width: 100%;
      height: 100%;
      background-color: var(--btn-color);
      border-radius: inherit;
      transform-origin: right;
    }
    .upload__hint {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      color: white;
      transform: translateY(100%);
    }
    .upload__progress {
      position: absolute;
      content: "";
      top: 90%;
      left: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      color: white;
      background: var(--progress-color);
      transform: scaleX(0);
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0