matter+anime实现拼单词游戏代码

代码语言:html

所属分类:游戏

代码描述:matter+anime实现拼单词游戏代码,从碗中找到尽量多的单词提交

代码标签: matter anime 单词 游戏 代码

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
:root {
    --primary: #dd5e36;
    --primary-dark: #ba4722;
    --primary-light: #ff7b59;
    --secondary: #61a8ff;
    --secondary-dark: #4389e3;
    --accent: #ffce56;
    --success: #4caf50;
    --error: #f44336;
    --soup-color: #ffca7a;
    --soup-shadow: #e6b663;
    --bowl-color: #f8f8f8;
    --letter-color: #ffffff;
    --text: #333333;
    --text-light: #777777;
    --background: #f5f5f5;
    --steam: rgba(255, 255, 255, 0.7);
    --glow-color: rgba(221, 94, 54, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

.alphabet-soup-game {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
}

.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-header h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 800;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.soup-bowl {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
}

.plate-shadow {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    filter: blur(10px);
    z-index: 1;
}

.plate {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border-radius: 50%;
    z-index: 2;
}

.bowl-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05),
        inset 0 -5px 15px rgba(0, 0, 0, 0.05);
    background: white;
    z-index: 3;
}

.soup {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    background-color: var(--soup-color);
    box-shadow: 
        inset 0 -10px 20px var(--soup-shadow),
        inset 0 10px 20px rgba(255, 255, 255, 0.3);
    overflow: hidden;
    cursor: pointer;
}

.bowl-highlight {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80%;
    height: 40%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
}

.steam-container {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 5;
    pointer-events: none;
}

.steam {
    position: absolute;
    width: 8px;
    background: linear-gradient(to top, transparent, var(--steam));
    border-radius: 50%;
    animation: steam 4s infinite ease-out;
    opacity: 0;
}

@keyframes steam {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
        filter: blur(2px);
    }
    30% {
        opacity: 0.5;
    }
    70% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(3);
        filter: blur(6px);
    }
}

.spoon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none;
}

.spoon {
    position: absolute;
    transform-origin: center;
}

.spoon-handle {
    position: absolute;
    width: 12px;
    height: 150px;
    background: linear-gradient(to right, #d2c0a5, #eadbc8, #d2c0a5);
    border-radius: 5px;
    transform-origin: top center;
    bottom: -150px;
    left: -6px;
}

.spoon-head {
    position: absolute;
    width: 40px;
    height: 60px;
    background: linear-gradient(to right, #e0d1bc, #f5eee4, #e0d1bc);
    border-radius: 50%;
    top: -30px;
    left: -20px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
}

.letter {
    position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
    overflow: hidden;
}

.letter:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 0 12px var(--glow-color);
    transform: translateY(-2px);
}

.letter-points {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: normal;
    color: var(--text-light);
}

.letter.selected {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 15px var(--glow-color);
}

.letter.selected .letter-points {
    color: rgba(255, 255, 255, 0.8);
}

.letter .ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    border-radius: 50%;
    z-index: -1;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    background-color: var(--primary);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    animation: particle-fade 1s forwards ease-out;
}

@keyframes particle-fade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty));
    }
}

.word-builder {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.word-display {
    width: 100%;
    min-height: 60px;
    background-color: white;
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    letter-spacing: 2px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.word-display..........完整代码请登录后点击上方下载按钮下载查看

网友评论0