react密码强度输入检测效果代码
代码语言:html
所属分类:表单美化
代码描述:react密码强度输入检测效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
:root {
--dark-green: hsl(147, 26%, 27%);
--green: hsl(148, 26%, 48%);
--light-green: hsl(149, 34%, 88%);
--white: hsl(0, 0%, 100%);
--space: 20px;
--color: hsl(0, 0%, 20%);
--color-focus: hsl(0, 0%, 50%);
--transition: all 0.2s ease-out;
}
*,
*:before,
*:after {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
html {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1;
color: var(--color);
}
.App {
min-height: 100vh;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
font-family: 'Montserrat', sans-serif;
letter-spacing: 0.4px;
}
.github-button {
position: absolute;
display: inline-block;
padding: 12px 14px;
color: var(--white);
background: #222;
text-decoration: none;
border-radius: 4px;
right: 4%;
top: 4%;
font-size: 14px;
font-weight: 600;
}
.form-box {
width: 320px;
max-width: 320px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
display: -webkit-box;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
}
.validation-box {
padding: var(--space);
background: var(--dark-green);
margin-bottom: var(--space);
border-radius: 8px;
box-shadow: 0px 10px 43px 0px rgba(0, 0, 0, 0.12);
list-style: none;
font-size: 0.875em;
font-weight: 600;
color: var(--white);
}
.validation-item {
position: relative;
padding-left: calc(var(--space) + 8px);
}
.validation-item:not(:last-child) {
margin-bottom: 16px;
}
.validation-item.done {
color: hsla(0, 0%, 100%, 40%);
}
.validation-icon {
position: absolute;
width: 14px;
height: 14px;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
left: 0px;
}
.check {
stroke-dasharray: 45;
stroke-dashoffset: 45;
-webkit-animation: check 0.2s 0.1s ease-in-out forwards;
animation: check 0.2s 0.1s ease-in-out forwards;
}
@-webkit-keyframes check {
0% {
stroke-dashoffset: 45;
}
100% {
stroke-dashoffset: 20;
}
}
@keyframes check {
0% {
stroke-dashoffset: 45;
}
100% {
stroke-dashoffset: 20;
}
}
.form-field {
display: -webkit-box;
display: flex;
position: relative;
border-radius: 8px;
overflow: hidden;
box-shadow: 0px 10px 43px 0px rgba(0, 0, 0, 0.12);
}
.form-field:active {
-webkit-transform: scale(0.98);
transform: scale(0.98);
-webkit-transition: var(--transition);
transition: var(--transition);
}
.form-input {
padding-left: var(--space);
padding-bottom: 2px;
padding-top: 25px;
padding-right: 80px;
width: 100%;
font-size: 18px;
font-family: 'fontello';
font-style: normal;
font-weight: normal;
speak: none;
font-variant: normal;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
letter-spacing: 8px;
font-size: 2.4em;
height: 40px;
overflow: hidden;
color: transparent;
text-shadow: 0 0 0 var(--green);
}
.form-label {
position: absolute;
font-size: 120%;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0