密码输入框显示密码扫描动画效果代码

代码语言:html

所属分类:表单美化

代码描述:密码输入框显示密码扫描动画效果代码

代码标签: 显示 密码 扫描 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
/*** CSS DEBUG IN PROGRESS ***/

:root {
	--color1: #e0e0e0;
	--color2: #c5c5c5;
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background: var(--color1);
	font-family: monospace, Arial, Helvetica, sans-serif;
}

body * {
	box-sizing: border-box;
	outline: none;
}

.container {
	width: 210px;
	position: relative;
}

input {
	background: #ececec;
	border: 0;
	font-size: 1em;
	width: 100%;
	box-shadow: 0.15em 0.15em 0.25em var(--color2) inset,
		-0.15em -0.15em 0.25em #ffffff80 inset, 0.3em 0.3em 0.6em var(--color2),
		-0.2em -0.2em 0.5em #ffffff80;
	border-radius: 4px;
	padding: 10px;
	position: absolute;
	z-index: 1;
	height: 40px;
	color: #808080;
	font-family: monospace, Arial, Helvetica, sans-serif;
}

input:focus {
}

input::placeholder {
	color: #808080;
	opacity: 1;
}

input:-ms-input-placeholder {
	color: #808080;
}

input::-ms-input-placeholder {
	color: #808080;
}

#reveal {
	width: 40px;
	height: 40px;
	border-radius: 4px;
	border: 0;
	background: linear-gradient(145deg, #72c0ff, #0070ca);
	cursor: pointer;
	position: absolute;
	z-index: 3;
	right: 0px;
	box-shadow: 0.3rem 0.3rem 0.6rem var(--color2), -0.2rem -0.2rem 0.5rem #fff;
	border: 2px solid var(--color1);
	transition: all 0.5s ease 0s;
	border-top-color: #cccccc;
	border-bottom-color: #eee;
}

#reveal:disabled {
	transition: all 0.5s ease 0s;
	background: linear-gradient(145deg, #ced5e0, #757575) !important;
	cursor: default;
}

#reveal.open {
	transition: all 0.5s ease 0s;
	background: linear-gradient(145deg, #8ce88f, #009205);
}

#fakepass {
	font-size: 1em;
	width: 0%;
	border-radius: 4px 0 0 4px;
	position: absolute;
	background: #ececec;
	z-index: 2;
	height: 40px;
	top: 0;
	right: 0;
	left: 0;
	transition: all 1s ease 0s;
	width: 0;
	line-height: 40px;
	text-indent: 10px;
	overflow: hidden;
	box-shadow: 0.15em 0.15em 0.25em var(--color2) inset,
		-0.15em -0.15em 0.25em #ffffff80 inset;
	animation: scan-hide 1s ease-out 0s 1;
	color: #808080;
}

#fakepass.scan {
	display: block;
	animation: scan-show 1s ease-out 0s 1;
	width: 0%;
	left: 0;
}

#fakepass:before {
	content: "";
	height: 40px;
	width: 0px;
	position: absolute;
	right: 13px;
	top: 0;
	box-shadow: -10px 0 20px 10px #33a4ffad, 0 0 10px 5px #33a4ffab;
}

#fakepass.scan:before {
	display: none;
}

#fakepass:after {
	content: "";
	height: 40px;
	width: 2px;
	background: #92ceff;
	position: absolute;
	right: 10px;
	top: 0;
	box-shadow: 0 0 3px 1px #33a4ff, 0 0 5px 3px #33a4ff;
	animation: light 0.15s ease 0s infinite;
}

#fakepass.scan:after {
	background: #07ff10;
	box-shadow: 0 0 3px 1px #00cc08, 0 0 5px 3px #00cc08;
	right: 5px;
}

@keyframes light {
	50% {
		opacity: 0.5;
	}
}

@keyframes .........完整代码请登录后点击上方下载按钮下载查看

网友评论0