每日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>
相关推荐
大今野8 小时前
第 16 章计算机网络体系结构详解:OSI七层模型、TCP/IP四层协议、三次握手与四次挥手
网络协议·tcp/ip·php·专转本
Risehuxyc10 小时前
PHP能不能在参数里放匿名函数
开发语言·php
FRing0311 小时前
vue3干货总结3(defineOptions(Vue3.3)、defineModel(Vue3.4)、Pinia)
开发语言·前端·vue.js·vue3
Bczheng111 小时前
组件化服务端渲染模式SSR
前端
whitelbwwww12 小时前
CUDA C++实战--中级
开发语言·前端·c++
张紫娃12 小时前
Chrome插件-Stylus(屏蔽博客广告)
前端·chrome·stylus
Yannik13 小时前
在 Apple Silicon Mac 上用 Jenkins + Fastlane 搭建 iOS CI:从自动打包到 MR 检查流水线的完整实践
前端
Nayana13 小时前
《Web 到 HarmonyOS》-- 打包:Vite 产物 → HAP / HAR / HSP
前端
FungLeo13 小时前
FengCMS · PHP+MySQL 升级实录 · 内容写入一致性:锁等待超时与跨模型子树删除竞态
开发语言·mysql·php·工程实践·fengcms
inksci13 小时前
用飞帆做了个小网页
前端·javascript·css·html