js+css实现json数据生成网页ppt演示文稿代码

代码语言:html

所属分类:布局界面

代码描述:js+css实现json数据生成网页ppt演示文稿代码,可通过修改json数据来更改主题及每个页面的数据。

代码标签: js css json 数据 生成 网页 ppt 演示 文稿 代码

下面为部分代码预览,完整代码请点击下载或在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>动态PPT生成器</title>
    <!-- 引入Font Awesome图标库 -->
  <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
    <!-- 引入Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style id="dynamic-styles">
        /* 动态样式将通过JavaScript注入 */
    </style>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Roboto', 'Microsoft YaHei', sans-serif;
            line-height: 1.6;
        }
        
        .slide {
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 50px;
            position: relative;
            overflow: hidden;
            margin-bottom: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }
        
        .slide::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            opacity: 0.1;
            z-index: 0;
        }
        
        .slide-content {
            position: relative;
            z-index: 1;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
        }
        
        .slide-number {
            position: absolute;
            bottom: 20px;
            right: 20px;
            font-size: 14px;
            opacity: 0.7;
        }
        
        .title-slide {
            text-align: center;
        }
        
        .two-column {
            display: flex;
            gap: 40px;
            align-items: center;
        }
        
        .column {
            flex: 1;
        }
        
        .point-list {
            list-style: none;
            margin-bottom: 30px;
        }
        
        .point-list li {
            margin-bottom: 15px;
            display: flex;
            align-items: flex-start;
        }
        
        .point-list i {
            margin-right: 15px;
            font-size: 1.2rem;
            margin-top: 5px;
        }
        
        .point-text {
            flex: 1;
        }
        
        .point-title {
            font-weight: bold;
            font-size: 1.2rem;
            margin-bottom: 5px;
        }
        
        .point-desc {
            opacity: 0.8;
            font-size: 1rem;
        }
        
        .image-container {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
        .image-container img {
            width: 100%;
            height: auto;
            display: block;
            transition: transform 0.3s;
        }
        
        .image-container:hover img {
            transform: scale(1.05);
        }
        
        .stat-container {
            display: flex;
            justify-content: space-around;
            margin: 40px 0;
            flex-wrap: wrap;
        }
        
        .stat-item {
            text-align: center;
            padding: 20px;
            border-radius: 10px;
            backdrop-filter: blur(5px);
            margin: 10px;
            flex: 1;
            min-width: 200px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        
        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .stat-label {
            font-size: 1rem;
            opacity: 0.8;
        }
        
        .quote-slide {
            text-align: center;
            padding: 100px 50px;
        }
        
        .quote {
            font-size: 2rem;
            font-style: italic;
            max-width: 800px;
            margin: 0 auto 30px;
            position: relative;
        }
        
        .quote::before, .quote::after {
            content: '"';
            font-size: 4rem;
            opacity: 0.5;
            position: absolute;
        }
        
        .quote::before {
            top: -40px;
            left: -20px;
        }
        
        .quote::after {
            bottom: -70px;
            right: -20px;
        }
        
      .........完整代码请登录后点击上方下载按钮下载查看

网友评论0