js+css实现转轮密码锁图片验证码解锁代码
代码语言:html
所属分类:其他
代码描述:js+css实现转轮密码锁图片验证码解锁代码,每个滚轮可鼠标滚轮滚动或拖拽选择数字
代码标签: js css 转轮 密码锁 图片 验证码 解锁 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>转轮密码锁验证</title>
<style>
/* 全局样式重置和基础设置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
font-family: 'Helvetica Neue', 'Arial', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
/* 主容器 */
.container {
text-align: center;
background: rgba(255, 255, 255, 0.98);
padding: 40px;
border-radius: 25px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
max-width: 90%;
width: 500px;
transition: transform 0.3s ease-in-out;
}
.container:hover {
transform: translateY(-5px);
}
h1 {
color: #333;
margin-bottom: 25px;
font-size: 26px;
font-weight: 600;
letter-spacing: 1px;
}
/* 验证码区域 */
.captcha-container {
margin-bottom: 30px;
}
#captchaCanvas {
background: #f0f2f5;
border-radius: 12px;
box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition: transform 0.2s ease;
}
#captchaCanvas:hover {
transform: scale(1.03);
}
.refresh-btn {
margin-top: 15px;
padding: 10px 25px;
background: linear-gradient(135deg, #5a67d8 0%, #8b5cf6 100%);
color: white;
border: none;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(90, 103, 216, 0.4);
}
.refresh-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(90, 103, 216, 0.5);
}
.refresh-btn:active {
transform: translateY(0);
box-shadow: 0 3px 8px rgba(90, 103, 216, 0.3);
}
/* 转轮密码锁区域 */
.lock-container {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 30px;
perspective: 1200px; /* 增加3D透视效果 */
}
.wheel {
position: relative;
width: 70px;
height: 120px;
cursor: grab;
user-select: none;
}
.wheel:active {
cursor: grabbing;
}
.wheel-wrapper {
position: absolute;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: opacity 0.2s;
}
.wheel.dragging .wheel-wrapper {
opacity: 0.7; /* 拖拽时变半透明 */
}
.wheel-outer {
position: absolute;
width: 100%;
height: 100%;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0