three实现儿童3d三维魔方教学互动游戏代码
代码语言:html
所属分类:游戏
代码描述:three实现儿童3d三维魔方教学互动游戏代码
代码标签: three 儿童 3d 三维 魔方 教学 互动 游戏 代码
下面为部分代码预览,完整代码请点击下载或在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>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=ZCOOL+KuaiLe&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--bg-1: #FFE5D9;
--bg-2: #FFCAD4;
--bg-3: #F4ACB7;
--card: rgba(255, 248, 240, 0.85);
--card-border: rgba(255, 180, 140, 0.4);
--primary: #FF6B35;
--primary-dark: #E54B15;
--accent-1: #00C896;
--accent-2: #FFD93D;
--accent-3: #6A4C93;
--text: #2D2A32;
--text-soft: #6B5D5D;
--shadow: 0 8px 30px rgba(255, 107, 53, 0.15);
--shadow-lg: 0 15px 50px rgba(255, 107, 53, 0.25);
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: 'Fredoka', 'ZCOOL KuaiLe', sans-serif;
background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
}
.floating-shape {
position: fixed;
border-radius: 50%;
pointer-events: none;
filter: blur(2px);
opacity: 0.5;
z-index: 0;
animation: floatBlob 15s infinite ease-in-out;
}
.shape-1 { width: 300px; height: 300px; background: radial-gradient(circle, #FFD93D, transparent); top: -100px; right: -80px; animation-delay: 0s; }
.shape-2 { width: 250px; height: 250px; background: radial-gradient(circle, #00C896, transparent); bottom: -80px; left: -80px; animation-delay: -5s; }
.shape-3 { width: 180px; height: 180px; background: radial-gradient(circle, #FF6B35, transparent); top: 40%; left: 10%; animation-delay: -10s; }
@keyframes floatBlob {
0%, 100% { transform: translate(0,0) scale(1); }
33% { transform: translate(30px, -40px) scale(1.1); }
66% { transform: translate(-20px, 30px) scale(0.95); }
}
.bg-pattern {
position: fixed;
inset: 0;
background-image:
radial-gradient(circle at 20% 30%, rgba(255, 217, 61, 0.15) 0%, transparent 8%),
radial-gradient(circle at 80% 70%, rgba(0, 200, 150, 0.15) 0%, transparent 8%),
radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 6%);
background-size: 250px 250px, 300px 300px, 200px 200px;
pointer-events: none;
z-index: 0;
}
.app-container {
position: relative;
z-index: 1;
max-width: 1500px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 20px;
position: relative;
}
.logo-badge {
display: inline-flex;
align-items: center;
gap: 12px;
background: var(--card);
backdrop-filter: blur(20px);
padding: 14px 28px;
border-radius: 100px;
border: 2px solid var(--card-border);
box-shadow: var(--shadow);
}
.logo-cube {
width: 38px;
height: 38px;
background: linear-gradient(135deg, var(--primary), var(--accent-2));
border-radius: 8px;
position: relative;
transform: rotate(15deg);
box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
animation: cubeSpin 8s infinite linear;
}
.logo-cube::before, .logo-cube::after {
content: '';
position: absolute;
background: rgba(255,255,255,0.4);
}
.logo-cube::before { left: 33%; top: 0; width: 2px; height: 100%; }
.logo-cube::after { top: 33%; left: 0; height: 2px; width: 100%; }
@keyframes cubeSpin {
0% { transform: rotate(15deg) scale(1); }
50% { transform: rotate(195deg) scale(1.05); }
100% { transform: rotate(375deg) scale(1); }
}
h1 {
font-family: 'ZCOOL KuaiLe', sans-serif;
font-size: clamp(28px, 4vw, 44px);
margin: 0;
background: linear-gradient(135deg, var(--primary), var(--accent-3));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
letter-spacing: 2px;
}
.subtitle {
color: var(--text-sof.........完整代码请登录后点击上方下载按钮下载查看















网友评论0