纯css实现下载进度条动画效果

代码语言:html

所属分类:表单美化

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

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

<title> Download Progress Bar &quot;Only CSS&quot;</title>

<style>
      @import url("https://fonts.googleapis.com/css?family=Saira+Semi+Condensed&display=swap");
* {
  font-family: "Saira Semi Condensed", sans-serif;
  transition: all 0.5s ease;
}

body {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
}

.container {
  padding: 64px;
  position: relative;
}

.btn {
  background: #2f4ad0;
  padding: 8px 16px;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 8px 6px -6px #555;
}
.btn:hover {
  letter-spacing: 2px;
  box-shadow: none;
}
.btn i {
  margin: 0 10px 0 0;
}

#succes, .loader {
  background: #fff;
}

#succes {
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  display: flex;
  position: absolute;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all 0.5s ease;
  -webkit-transform: translate(-50%, -50%) scale(0, 0);
          transform: translate(-50%, -50%) scale(0, 0);
}
#succes a {
  top: 0;
  right: 6px;
  display: block;
  position: absolute;
  color: #000;
}
#succes span {
  background: #2fb65a;
  padding: 8px 16px;
  color: #fff;
  border-radius: 4px;
}
#succes span i {
  margin: 0 10px 0 0;
}

.loader {
  display: block;
  width: 100%;
  top: 0;
  left: 0;
  height: 100%;
  position: absolute;
  z-index: 1;
  visibility: hidden;
}
.loader:before {
  content: "";
  display: flex;
  width: 100%;
  top: 0;
  left: 0;
  height: 100%;
  position: absolute;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  font-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0