div+css实现验证码分割输入框代码

代码语言:html

所属分类:表单美化

代码描述:div+css实现验证码分割输入框代码

代码标签: div css 验证码 分割 输入框 代码

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

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

     <style>
 
     .form {
          margin: 100px auto;
  --black: #000000;
  --ch-black: #141414;
  --eer-black: #1b1b1b;
  --night-rider: #2e2e2e;
  --white: #ffffff;
  --af-white: #f3f3f3;
  --ch-white: #e1e1e1;
  --tomato: #fa5656;
  font-family: Helvetica, sans-serif;
  border: 2px solid var(--glow-color);
  padding: 25px;
  display: flex;
  max-width: 420px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  color: var(--night-rider);
  background-color: var(--white);
  border-radius: 8px;
  position: relative;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, .15);
}

/*----heading and description-----*/

.info {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.title {
  font-size: 1.5rem;
  font-weight: 900;
}

.description {
  margin-top: 10px;
  font-size: 1rem;
}

/*----input-fields------*/

.form .input-fields {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.form .input-fields input {
  height: 2.5em;
  width: 2.5em;
  outline: none;
  text-align: center;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.5rem;
  color: var(--ch-black);
  border-radius: 5px;
  border: 2.5px solid var(--ch-white);
  background-color: var(--ch-white);
}

.form .input-fields input:focus {
  border: 1px solid var(--night-rider);
  box-shadow: inset 10px 10px 10px rgba(0, 0, 0, .15);
  transform: scale(1.05);
  transition: 0.5s;
}

/*-----verify and clear buttons-----*/

.action-btns {
  display: flex;
  margin-top: 20px;
  gap: 0.5rem;
}

.verify {
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  text-shadow: none;
  background: var(-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0