vue实现多步骤进度条表单填写效果代码

代码语言:html

所属分类:表单美化

代码描述:vue实现多步骤进度条表单填写效果代码,自带步骤切换动画

代码标签: vue 多步骤 进度条 表单 填写

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

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

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

    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Noto+Sans&amp;display=swap'>
<style>
    body {
  margin: 0;
  padding: 0;
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  font-family: "Noto Sans", sans-serif;
  background: radial-gradient(#DF5C2E, #A43227);
}

article {
  display: flex;
  margin: 10px;
  width: calc(100% - 20px);
  max-width: 720px;
  min-height: 480px;
  perspective: 1000px;
}
article header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 480px;
  background-color: #fff;
  border-right: 2px dotted #DF5C2E;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 10px 10px rgba(0, 0, 0, 0.2);
}
article .progress-step {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-bottom: 20px;
  color: #fff;
  background-color: #DF5C2E;
  font-weight: bold;
}
article .progress-step.active {
  background-color: #DF5C2E;
}
article .progress-step.active ~ .progress-step {
  color: #555;
  background-color: #ccc;
}
article .progress-step.active ~ .progress-step::before {
  background-color: #ccc;
}
article .progress-step:before {
  content: "";
  position: absolute;
  top: -20px;
  width: 2px;
  height: 20px;
  background: #DF5C2E;
  z-index: 10;
}
article .progress-step:first-child::before {
  display: none;
}
article section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 10px 10px rgba(0, 0, 0, 0.2);
}
article section h2 {
  font-size: 1.6rem;
  color: #DF5C2E;
  margin: 0;
  padding: 20px;
}
article section .input-fields {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
}
article section .input-container {
  position: relative;
  padding: 30px 20px 20px 20px;
  width: calc(100% - 40px);
  max-width: 400px;
}
article section .input-container input {
  position: relative;
  width: 100%;
  font-family: "Noto Sans", sans-serif;
  font-size: 1.35rem;
  outline: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  border-bottom: 2px dashed #DF5C2E;
}
article section .input-container input:valid + .input-label {
  top: 10px;
  left: 20px;
  font-size: 0.7rem;
  font-weight: normal;
  color: #999;
}
article section .input-container input.wrong-input + .input-label {
  color: #B92938;
}
article section .input-label {
  position: absolute;
  top: 32px;
  left: 20px;
  font-size: 1.35rem;
  pointer-events: none;
  transition: 0.2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0