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;
        }

        body {
            font-family: 'Comic Sans MS', '微软雅黑', sans-serif;
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
            height: 100vh;
            overflow: hidden;
        }

        .story-container {
            position: relative;
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.6"/><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.4"/><circle cx="40" cy="70" r="1" fill="white" opacity="0.5"/><circle cx="70" cy="80" r="2.5" fill="white" opacity="0.3"/></svg>');
        }

        .image-container {
            flex: 1;
            position: relative;
            margin: 20px;
            border: 6px solid #fff;
            border-radius: 20px;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            transform: rotate(-1deg);
        }

        .story-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 14px;
        }

        .subtitle-container {
            position: absolute;
            bottom: 80px;
            left: 20px;
            right: 20px;
            background: linear-gradient(145deg, #fff, #f0f8ff);
            padding: 20px;
            border-radius: 25px;
            border: 4px solid #87ceeb;
            box-shadow: 0 8px 20px rgba(135, 206, 235, 0.3);
        }

        .subtitle-text {
            color: #2c3e50;
            font-size: 18px;
            line-height: 1.6;
            text-align: center;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        }

        .controls {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .control-btn {
            width: 60px;
            height: 60px;
            border: none;
      .........完整代码请登录后点击上方下载按钮下载查看

网友评论0