每日60秒新闻早报单页文字版HTML源码

每日60秒新闻早报单页文字版的,这个很早就有了,最近有用户问我这个怎么实现,其实很简单的只是一个单页而已,这个是PHP版的会将头部图片缓存到本地然后在展示可防止接口信息泄露。

PHP接口源码

每日新闻早报.zip

HTML代码

html 复制代码
<!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>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .container {
            width: 90%;
            max-width: 800px;
            margin: 20px auto;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .header img {
            width: 100%;
            height: auto;
            border-radius: 8px;
        }
        h1 {
            text-align: center;
            margin: 20px 0;
        }
        ul {
            list-style-type: none;
            padding: 0;
        }
        li {
            background-color: #fff;
            padding: 10px;
            border-radius: 8px;
        }
        .weiyu {
            text-align: center;
            font-style: italic;
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <img src="<?php echo $headImageFile; ?>">
        </div>
        <h1><?php echo $date; ?> 新闻早报</h1>
        <ul>
            <?php foreach ($news as $newsItem): ?>
                <li><?php echo $newsItem; ?></li>
            <?php endforeach; ?>
        </ul>
        <p class="weiyu"><?php echo $weiyu; ?></p>
    </div>
</body>
</html>
相关推荐
子兮曰1 小时前
把 649 种文件格式塞进一个网页里:一个「文件不出浏览器」的预览器
前端·javascript·后端
sm_926787054 小时前
RFID 标签打印的技术实现要点与二次开发实践
java·大数据·前端·c++·编辑器
IMPYLH4 小时前
HTML 的 <video> 元素
前端·html
溪语流沙5 小时前
【每天一个CSS | Day19】流光文字与一笔写成的手写签名
前端·javascript·css
逐光者9335 小时前
STM32——SPI 屏 · Flash · 高速
java·前端·stm32
To_OC5 小时前
同样是让 AI 写全栈,为什么别人一句话就够了
前端·前端框架·next.js
CDwenhuohuo5 小时前
electron pc项目打包成桌面端
前端·javascript·electron
前端大斗师5 小时前
「大于 1000」把 1000 元那单也算进去了:我在 Vue3 订单页对了 10 句话
前端·人工智能·typescript·大模型·原力计划
copilot中国版6 小时前
PPT Copilot 一键统一全篇版式,告别字体混乱、元素错位和重复排版
html·powerpoint·copilot
Jmyd01236 小时前
用 Web VR 引擎搭建 3D 虚拟展厅:从素材上云到多端实时渲染的完整数据链路
前端·3d·vr·三维数字化