svg仓鼠驾驶复古发条单轮车交互动画代码
代码语言:html
所属分类:其他
代码由gemini-3.7-flash ai生成,可能有错误,仅供参考:点击查看提示词
代码描述:svg仓鼠驾驶复古发条单轮车交互动画
代码标签: svg 仓鼠 驾驶 复古 发条 单轮车 交互 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>蒸汽绅士仓鼠 - 发条单轮车</title>
<style>
* {
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
margin: 0;
padding: 0;
}
body {
background: radial-gradient(circle at center, #2e2620 0%, #15100d 100%);
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow: hidden;
font-family: 'Georgia', serif;
color: #d4af37;
}
#scene-container {
position: relative;
width: 100%;
max-width: 800px;
height: 550px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
svg {
width: 100%;
height: 100%;
overflow: visible;
filter: drop-shadow(0 15px 20px rgba(0,0,0,0.6));
}
/* UI 装饰与控制层 */
.vintage-ui {
position: absolute;
top: 20px;
text-align: center;
pointer-events: none;
z-index: 10;
}
.title {
font-size: 24px;
letter-spacing: 3px;
text-transform: uppercase;
text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(212,175,55,0.4);
}
.tips {
font-size: 13px;
color: #a89f91;
margin-top: 6px;
font-family: sans-serif;
letter-spacing: 1px;
}
.dashboard {
position: absolute;
bottom: 25px;
display: flex;
gap: 20px;
align-items: center;
background: rgba(30, 22, 18, 0.7);
border: 2px solid #8c6f3d;
border-radius: 30px;
padding: 8px 24px;
box-shadow: inset 0 0 10px #000, 0 4px 15px rgba(0,0,0,0.5);
}
.spring-bar-wrap {
width: 160px;
height: 14px;
background: #110d0a;
border: 1px solid #d4af37;
border-radius: 7px;
overflow: hidden;
position: relative;
}
.spring-bar {
width: 30%;
height: 100%;
background: linear-gradient(90deg, #d4af37, #ff6b35);
transition: width 0.1s ease-out;
box-shadow: 0 0 8px #ff6b35;
}
/* 动画关键帧定义 */
@keyframes spinClockwise {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes spinCounter {
from { transform: rotate(360deg); }
to { transform: rotate(0deg); }
}
@keyframes bobbing {
0%, 100% { transform: translateY(0px) rotate(0deg); }
.........完整代码请登录后点击上方下载按钮下载查看















网友评论0