东营码良软件开发
  • 首页
  • 产品与服务
    抖音软件
  • 开发案例
  • 新闻资讯
    二级菜单A
  • 关于我们
  • GEO 优化
  • Ai超市
咨询客服
企业咨询
会员中心
登录注册找回密码
东营码良软件开发
首页›
产品与服务›
开发案例›
新闻资讯›
二级菜单A›
关于我们›GEO 优化›Ai超市›
会员中心
首页产品与服务开发案例新闻资讯我的
Dongying Maliang Software

码良软件开发

企业软件开发·微信小程序·网站建设·GEO 优化·AI 应用落地

咨询客服

导航

  • 首页
  • 产品与服务
  • 开发案例
  • 新闻资讯
  • 关于我们
  • GEO 优化
  • Ai超市

服务

  • 软件开发定制
  • GEO 搜索优化
  • 软件资源商城
  • 会员服务
  • 在线客服

行业方案

  • 零售门店
  • 教育培训
  • 医疗健康
  • 商务服务
  • 本地生活
  • 生产制造

联系电话

1886546092715154670927

地址

山东省东营市垦利区兴隆路8-5号

扫码

码良软件开发 · 品牌入驻
品牌入驻手机端查看商城、案例与在线咨询

Copyright © 2014-2026 东营码良软件开发 Inc. 版权所有鲁ICP备2025202136号-2豫公网安备41019602002340经营许可证编号:豫B2-20190103
开发资讯 > 资讯详情

新闻资讯板块 · 改造预览

2026-10-03 15:29:01阅读 1

新闻资讯板块 · 改造预览

保留 h3 大标题 + .tips 副标题的位置与样式不变(padding-top:70px、h3 40px/800、tips 18px #5e6470),只改主体 .messageCont 部分。

改造方向:左列加装饰序号 + 右列精选图上叠加信息,整体从「公司简介感」变成「杂志专题感」。配色沿用站内三色体系(品牌橙 #ff6726 / 近黑 #1f2329 / 次要灰 #6b7280),不引入新色。

<!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>
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #1f2329;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ══════════════════════════════════════════════════
   模拟页面容器
   ══════════════════════════════════════════════════ */
.legacyHome {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px 120px;
}

/* ══════════════════════════════════════════════════
   板块外壳
   ══════════════════════════════════════════════════ */
.messageBox {
  margin-top: 120px;
}

.contBox {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 20px;
  padding: 0 80px 70px;
  box-shadow: 0 41px 51px rgba(166,166,166,.08);
}

/* ══════════════════════════════════════════════════
   页标题(★ 保持原样,位置与样式未改动)
   ══════════════════════════════════════════════════ */
.pageTitle {
  padding-top: 70px;
  text-align: center;
}

.pageTitle h3 {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  color: #101723;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.pageTitle .tips {
  margin-top: 10px;
  font-size: 18px;
  color: #5e6470;
}

/* ══════════════════════════════════════════════════
   主体布局
   ══════════════════════════════════════════════════ */
.messageCont {
  margin-top: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 620px;
  gap: 60px;
  align-items: start;
}

.list {
  min-width: 0;
}

/* ══════════════════════════════════════════════════
   列表项 · 序号 + 标题 + 摘要 + 日期
   ══════════════════════════════════════════════════ */
.item {
  padding: 32px 0;
  border-bottom: 1px solid #eef0f3;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}

.item:first-of-type { padding-top: 0; }

.item a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  text-decoration: none;
  color: inherit;
  align-items: start;
}

.item a:focus-visible {
  outline: 2px solid #ff6726;
  outline-offset: 4px;
  border-radius: 6px;
}

/* ── 大序号装饰 ── */
.item .idx {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: #e6e9ee;
  letter-spacing: -.04em;
  padding-top: 2px;
  transition: color 240ms cubic-bezier(.2,.8,.2,1);
  user-select: none;
}

/* ── 标题 ── */
.item .title {
  font-size: 20px;
  font-weight: 800;
  color: #1f2329;
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: -.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 220ms cubic-bezier(.2,.8,.2,1);
}

/* ── 摘要 ── */
.item .synopsis {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 220ms cubic-bezier(.2,.8,.2,1);
}

/* ── 日期(带橙色小圆点) ── */
.item .time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9096a3;
  letter-spacing: .02em;
}

.item .time::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6726;
  transition: transform 240ms cubic-bezier(.34,1.4,.5,1);
}

/* ── 悬浮反馈 ── */
.item:hover { transform: translateX(4px); }
.item:hover .idx { color: #ff6726; }
.item:hover .title,
.item:hover .synopsis { color: #ff6726; }
.item:hover .time::before { transform: scale(1.4); }

/* ══════════════════════════════════════════════════
   更多按钮 · 胶囊 + 箭头
   ══════════════════════════════════════════════════ */
.list .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 16px 30px;
  background: #ff6726;
  color: #fff;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .04em;
  transition: all 240ms cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 12px 26px -10px rgba(255,103,38,.55);
}

.list .btn:hover {
  background: #ff7a3d;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(255,103,38,.65);
}

.list .btn:active { transform: translateY(0); }

.list .btn:focus-visible {
  outline: 2px solid #ff6726;
  outline-offset: 3px;
}

.list .btn .arrow {
  display: inline-block;
  transition: transform 240ms cubic-bezier(.34,1.4,.5,1);
}

.list .btn:hover .arrow { transform: translateX(4px); }

/* ══════════════════════════════════════════════════
   精选卡片 · 图片上叠加信息
   ══════════════════════════════════════════════════ */
.newItem {
  min-width: 0;
}

.newItem a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  position: relative;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}

.newItem a:focus-visible {
  outline: 2px solid #ff6726;
  outline-offset: 4px;
}

.newItem .thumb {
  position: relative;
  aspect-ratio: 620 / 440;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #2b3f6d 0%, #71381a 100%);
  isolation: isolate;
}

/* 底部渐变遮罩,保证白字可读 */
.newItem .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,.35) 70%,
    rgba(0,0,0,.68) 100%
  );
  pointer-events: none;
}

.newItem .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 800ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

.newItem:hover .thumb img { transform: scale(1.06); }

/* ── 精选标签 ── */
.newItem .badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  background: rgba(255,103,38,.94);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: 0 6px 18px -6px rgba(255,103,38,.7);
}

.newItem .badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,.28);
}

/* ── 图上文字 ── */
.newItem .thumb-title {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
}

.newItem .thumb-title .title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
  transition: color 220ms;
}

.newItem .thumb-title .time {
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,.82);
  letter-spacing: .06em;
}

.newItem:hover .thumb-title .title {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255,255,255,.7);
}

/* ══════════════════════════════════════════════════
   响应式 · ≤1280(右列收窄)
   ══════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .legacyHome { padding: 0 40px 100px; }
  .messageCont { grid-template-columns: minmax(0, 1fr) 520px; gap: 48px; }
  .contBox { padding: 0 60px 60px; }
  .newItem .thumb { aspect-ratio: 520 / 400; }
}

/* ══════════════════════════════════════════════════
   响应式 · ≤980(单列堆叠)
   ══════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .legacyHome { padding: 0 24px 80px; }
  .contBox { border-radius: 16px; padding: 0 28px 36px; }
  .pageTitle { padding-top: 50px; }
  .pageTitle h3 { font-size: 32px; }
  .pageTitle .tips { font-size: 15px; }

  .messageCont {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    margin-top: 36px;
  }

  .item { padding: 22px 0; }
  .item a { grid-template-columns: 48px 1fr; gap: 18px; }
  .item .idx { font-size: 32px; }
  .item .title { font-size: 17px; }
  .item .synopsis { font-size: 14px; -webkit-line-clamp: 2; }
  .item .time { font-size: 12px; }

  .list .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14px;
    margin-top: 26px;
  }

  .newItem .thumb { aspect-ratio: 16 / 9; border-radius: 14px; }
  .newItem .thumb-title { left: 22px; right: 22px; bottom: 20px; }
  .newItem .thumb-title .title { font-size: 18px; }
}

/* ══════════════════════════════════════════════════
   响应式 · ≤560(移动端)
   ══════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .legacyHome { padding: 0 16px 60px; }
  .contBox { padding: 0 18px 28px; border-radius: 14px; }
  .pageTitle { padding-top: 40px; }
  .pageTitle h3 { font-size: 26px; }
  .pageTitle .tips { font-size: 13px; margin-top: 8px; }

  .messageCont { margin-top: 28px; gap: 28px; }

  .item { padding: 18px 0; }
  .item a { grid-template-columns: 36px 1fr; gap: 12px; }
  .item .idx { font-size: 24px; padding-top: 0; }
  .item .title { font-size: 15px; margin-bottom: 8px; }
  .item .synopsis { font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
  .item .time { font-size: 12px; gap: 6px; }
  .item .time::before { width: 5px; height: 5px; }

  .list .btn { padding: 13px 18px; font-size: 13px; margin-top: 20px; gap: 8px; }

  .newItem .thumb { border-radius: 12px; aspect-ratio: 4 / 3; }
  .newItem .badge { top: 12px; left: 12px; padding: 5px 10px 5px 9px; font-size: 11px; }
  .newItem .thumb-title { left: 14px; right: 14px; bottom: 14px; }
  .newItem .thumb-title .title { font-size: 15px; line-height: 1.35; }
  .newItem .thumb-title .time { font-size: 11px; margin-top: 6px; }
}
</style>
</head>
<body>

<div class="legacyHome">
  <div class="messageBox" id="news">
    <div class="contBox">

      <!-- ★ 页标题:位置与样式保持不变 -->
      <div class="pageTitle">
        <h3>新闻资讯</h3>
        <div class="tips">4000+ 企业客户的共同选择</div>
      </div>

      <!-- ★ 主体:本次改造部分 -->
      <div class="messageCont">

        <!-- 左列 -->
        <div class="list">

          <div class="item">
            <a href="#">
              <div class="idx" aria-hidden="true">01</div>
              <div>
                <div class="title">GEO关键词优化布局:让品牌在 AI 搜索时代被优先推荐</div>
                <div class="synopsis">随着生成式 AI 逐渐成为用户获取信息的主要入口,品牌在 AI 回答中的可见度已经成为新的流量战场。</div>
                <div class="time">2026/10/01</div>
              </div>
            </a>
          </div>

          <div class="item">
            <a href="#">
              <div class="idx" aria-hidden="true">02</div>
              <div>
                <div class="title">从 0 到 1 搭建企业级内容中台:我们的实践与思考</div>
                <div class="synopsis">内容中台不是简单的 CMS 升级,而是企业数字资产的组织方式变革。本文分享我们服务客户过程中沉淀的方法论。</div>
                <div class="time">2026/09/28</div>
              </div>
            </a>
          </div>

          <a class="btn" href="#">
            <span>更多资讯</span>
            <span class="arrow" aria-hidden="true">→</span>
          </a>

        </div>

        <!-- 右列 · 精选 -->
        <div class="newItem">
          <a href="#">
            <div class="thumb">
              <div class="badge">精选</div>
              <img
                src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 440'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%232b3f6d'/%3E%3Cstop offset='.55' stop-color='%235b3a7a'/%3E%3Cstop offset='1' stop-color='%2371381a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23g)' width='620' height='440'/%3E%3C/svg%3E"
                alt="Semrush 2026 年度搜索趋势报告">
              <div class="thumb-title">
                <div class="title">Semrush 2026 年度搜索趋势报告:AI 搜索正在重塑流量入口</div>
                <div class="time">2026/09/29 · 行业报告</div>
              </div>
            </div>
          </a>
        </div>

      </div>

    </div>
  </div>
</div>

</body>
</html>

改造点对照

区域改动前改动后目的
大标题 / 副标题—未改动位置与样式完全保留
列表项标题 + 摘要 + 日期 纯文字堆叠加超大装饰序号 01 / 02(浅灰,hover 变橙),左侧固定列建立视觉节奏,读起来像「专题列表」而非「新闻堆砌」
日期纯灰文字前置一个橙色小圆点,hover 时圆点弹放让日期不再是可有可无的尾巴
列表项 hover仅文字变橙整条 translateX(4px) + 序号变橙 + 标题/摘要变橙 + 圆点弹放悬浮反馈从「变色」升级为「微动 + 变色」
精选卡片图片下方外挂标题与日期标题、日期叠加在图片上(底部渐变遮罩),图片左上角加「● 精选」橙色胶囊图片与信息合为一体,视觉冲击更强
精选图 hover无图片 scale(1.06) 缓慢放大 + 标题加白色下划线让用户"想点进去"
更多按钮直角 12px 圆角矩形胶囊形 999px + 右箭头 →,hover 时箭头右移 + 按钮上浮与站内搜索框、AI 开关的胶囊语系统一
圆角体系卡片 12px / 按钮 12px卡片 20px / 精选图 16px / 按钮 999px与站内 12/14/16/20px 体系对齐,不再是 8px 孤例
投影rgba(166,166,166,.1) 0 41px 51pxrgba(166,166,166,.08) 0 41px 51px(更柔和)白卡片"轻"一点
无障碍div.title / div.time,无焦点环加 :focus-visible 橙色焦点环;装饰性序号加 aria-hidden="true"键盘用户能看到焦点位置

落地到 legacy-home.tsx 需要动的 JSX

// 左列 item 结构调整(关键:加 .idx + 内层 div 包裹)
<div className="item">
  <a href={contentHref(item)}>
    <div className="idx" aria-hidden="true">
      {String(index + 1).padStart(2, '0')}
    </div>
    <div>
      <div className="title lineText">{item.title}</div>
      <div className="synopsis lineText2">{item.excerpt || '查看文章详情'}</div>
      <div className="time">{formatDate(item.publishedAt)}</div>
    </div>
  </a>
</div>

// 右列精选:结构不变,但把标题/日期移进 .thumb 内部
<div className="newItem">
  <a href={contentHref(feature)}>
    <div className="thumb">
      <div className="badge">精选</div>
      <img
        loading="lazy"
        decoding="async"
        src={feature.coverMedia?.publicUrl
          ? optimizedImageUrl(feature.coverMedia.publicUrl, 1080)
          : '/media/news-placeholder.svg'}
        alt={feature.coverMedia?.altText || feature.title}
      />
      <div className="thumb-title">
        <div className="title">{feature.title}</div>
        <div className="time">{formatDate(feature.publishedAt)}</div>
      </div>
    </div>
  </a>
</div>

// 更多按钮:加一个箭头 span
<a className="btn" href="/news">
  <span>{themeText(settings, 'home.news_more_label', '更多资讯')}</span>
  <span className="arrow" aria-hidden="true">→</span>
</a>

三个必须注意的硬约束(来自你的清单)

  1. .newItem 必须保留 min-width: 0——虽然这次没用 white-space:nowrap 的 .lineText,但 .title 用 -webkit-line-clamp:2 也有同样的撑宽风险。grid 布局里 minmax(0, 1fr) 已经兜住左列,右列显式定宽不参与撑开。
  2. AboutNewsFooter 里还有 #about——只改 .messageBox 相关规则,别碰 .aboutBox;新增的选择器都以 .messageBox . 或 .newItem / .item 开头,不会误伤。
  3. pageTitle 是共用组件——本次只用了 .messageBox .pageTitle { padding-top: 70px } 已有覆写,没有新增对 h3 / .tips 的规则,PageTitle 入场动画不受影响。

建议顺手修的两件事

  • 精选位不该锁死「第 3 条」:把 const feature = currentNews[2] 改成 currentNews.find(i => i.coverMedia) ?? currentNews[2]——保证精选位永远有图,避免长标题 + 无封面随机炸版式。
  • 默认图接上后台:/media/news-placeholder.svg → themeText(settings, 'theme.news_default_image', '/media/news-banner.png'),这样后台改默认图首页跟着变。

如果需要,我可以再给一个「1 大 + 3 小」的更激进版(左列 3 条纯文字、右列精选图更大、甚至加一个分类色标签栏),但那个要重做断点表。目前这版是在现有 flex/grid 结构上做视觉升级,改动量最小、回归风险最低。

DISCUSSION

评论

登录后参与
请使用网站前台用户账号登录后发表评论。

正在加载评论...


返回列表返回资讯列表下一篇ce2

作者信息

超级管理
超级管理
等级作者
126文章
0点赞
0收藏
查看作者其他文章

文章展示

ce2ce2ces1ces1vvvvvvvvvvvvvvvvvvvvvv吧vvvvv吧vvvvv12322221232222

热门排行

网站接入支付功能完整教程1网站接入支付功能完整教程8 阅读GEO企业官网完整搭建实操方案(2026最新标准)2GEO企业官网完整搭建实操方案(2026最新标准)
7 阅读
会员推荐关系 + 新零售商城 数据库 ER + 字段设计文档3会员推荐关系 + 新零售商城 数据库 ER + 字段设计文档15 阅读
扇形图片循环预览灯箱效果演示代码4扇形图片循环预览灯箱效果演示代码5 阅读
发布内容至抖音H5场景完整申请&接入流程5发布内容至抖音H5场景完整申请&接入流程5 阅读
东营母婴商城小程序开发6东营母婴商城小程序开发14 阅读
CONTENT GUIDE

文章目录

4 项
  1. 01改造点对照
  2. 02落地到 legacy-home.tsx 需要动的 JSX
  3. 03三个必须注意的硬约束(来自你的清单)
  4. 04建议顺手修的两件事