jquery实现密码输入强度检测效果代码
代码语言:html
所属分类:其他
代码描述:jquery实现密码输入强度检测效果代码。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Special+Elite&display=swap"); body { background: #553e8f; min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: sans-serif; } * { box-sizing: border-box; } .pwGuide { position: relative; width: 250px; height: 160px; } .pwGuide .pwList { position: absolute; top: 25px; left: 52px; width: 194px; height: 104px; border-radius: 6px; background: #fff; box-shadow: inset 3px 0 0 #cfdae1; transform: rotate(-5deg) translate3d(0, 0, 0); font-family: 'Special Elite', cursive; font-size: 12px; } .pwGuide .pwList:before { content: ''; width: 2px; height: 100%; background: #e45998; position: absolute; left: 22px; } .pwGuide .pwList ul { padding: 13px 0 0 0; } .pwGuide .pwList ul li { padding-bottom: 3px; margin-bottom: 6px; padding-left: 34px; border-bottom: 1px solid #d8cbf5; } .pwGuide .pwList ul li span { position: relative; color: #423666; } .pwGuide .pwList ul li span:after { content: ''; width: 100%; height: 3px; background: #70d5b9; position: absolute; left: 0; top: 3px; transform-origin: left; transform: scaleX(0); transition: transform 0.4s ease; } .pwGuide .pwList ul li span.valid:after { transform: scaleX(1); } .pwGuide .pwCheck { position: absolute; fill: none; top: 84px; right: 10px; } .pwCheck { transform: scale(0); transition: transform 0.3s cubic-bezier(0.86, 0.45, 0.72, 1.2); } .pwCheck.pwValid { transform: scale(1); } .inp-password { position: relative; margin: 40px 0 0 0; max-width: 240px; } .inp-password input { background: #3a296a; width: 100%; border: 0; border-radius: 14px; font-size: 16px; padding: 2px 60px 0 16px; height: 44px; margin: 0; font-family: sans-serif; color: #fff; } .inp-password input:focus { outline: none; } .inp-password #showPW { position: absolute; right: 20px; top: 17px; line-height: 14px; cursor: pointer; color: #f6bd41; font-size: 12px; font-family: 'Special Elite', cursive; font-weight: bold; } .inp-password #showPW:after { content: 'HIDE'; } .inp-password #showPW.hide:after { content: 'SHOW'; } .dribbble { position: fixed; right: 20px; bottom: 16px; color: #d92d79; font-family: 'Special Elite', cursive; font-size: 15px; text-decoration: none; } ::-webkit-input-placeholder { color: #ad9ed3; } </style> </head> <body> <div class="setPw"> <div class="pwGuide"> <div class="pwList"> <ul> <li><span id="pwChar">7 Characters</span></li> <li><span id="pwLower">1 lowercase</span></li> <li><span id="pwCap">1 UPPERCASE</span></li> <li><span id="pwNum">1 Number</span></li> </ul> </div> <svg class="pwCheck" width="32" height="33" viewbox="0 0 32 33"> <circle cx="16.1886" cy="16.6948" r="15.7492" fill="#70D5B9"></circle> <path d="M10.5639 16.4698L14.3887 20.7446L22.7133 12.645" stroke="white" stroke-width="2.69986"></path> </svg> <svg width="225" height="160" viewbox="0 0 225 160" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M74.3499 1.61518C116.925 -6.45707 134.575 17.6849 138.078 30.765C143.295 42.3501 136.065 80.2503 137.631 113.057C139.867 159.921 117.282 159.024 107.444 159.921C97.605 160.818 41.4799 154.091 22.6969 139.292C7.67061 127.453 -8.81015 78.4076 5.47931 45.3399C14.1999 25.1592 31.7753 9.68743 74.3499 1.61518Z" fill="#3A296A"></path> <path d="M21.6109 83.1567L20.9714 79.1187C20.2749 74.7216 23.275 70.5924 27.6722 69.8959V69.8959C32.0119 69.2086 36.1027 72.1232 36.8703 76.4495L37.6107 80.6226" stroke="#A59FC9" stroke-width="5.39972"></path> <rect x="14.4999" y="84.283" width="30.5984" height="28.3486" rx="3.59982" transform="rotate(-9 14.4999 84.283)" fill="#BE337A"></rect> <rect x="14.4999" y="84.283" width="30.5984" height="20.249" rx="3.59982" transform="rotate(-9 14.4999 84.283)" fill="#E3488B"></rect> <path fill-rule="evenodd" clip-rule="evenodd" d="M34.3401 100.243C35.3055 99.4602 35.8385 98.1979 35.63 96.8819C35.319 94.9182 33.475 93.5785 31..........完整代码请登录后点击上方下载按钮下载查看
网友评论0