支付成功感谢页 HTML 单页源码(订单确认模板)

带彩纸动画与打勾动效的支付成功页,含订单信息、发货进度与客服入口。

本源码是一款电商/SaaS 常用的「支付成功感谢页」单页模板,用户完成付款后跳转至此,用于确认订单并引导后续动作。整体采用淡蓝渐变背景配白色票据式卡片,视觉上干净、可信赖,是转化链路中不可或缺的一环。

设计亮点集中在细节动效:打勾图标使用 SVG stroke-dasharray 实现描边绘制动画,外圈带持续扩散的涟漪;页面加载时会有 38 片随机彩纸从顶部飘落,营造出恰到好处的庆祝感。中部的票据撕口效果由伪元素圆形挖空实现,配合虚线分割营造出实体小票的质感。内容上覆盖订单编号(可一键复制)、商品、支付方式、收货地址与四步发货进度条。

适合电商网站、在线课程、SaaS 订阅、活动报名等所有需要付款确认页的场景。只需替换订单字段与按钮链接,即可接入自己的支付回调页面;若不需要庆祝动效,删除底部 script 即可。

支付成功感谢页 HTML 单页源码(订单确认模板)

使用教程

1. 下载与保存

将下方 HTML 源码全部复制,保存为 index.html 文件(注意文件后缀必须是 .html)。

2. 本地预览

直接双击 index.html 文件,浏览器会自动打开并渲染页面效果。也可以在文件夹内运行 python -m http.server 后访问 localhost:8000 进行预览。

3. 自定义修改

替换文字:直接编辑 HTML 中的标题、段落文本与链接。调整配色:修改 <style> 标签内的 CSS 变量(:root 部分)或具体颜色值。更换图片:将 <img> 的 src 属性换成你自己的图片地址,或将背景渐变替换为 background-image。

4. 上线部署

index.html 上传到任意支持静态网页托管的服务(GitHub Pages、Vercel、Netlify、阿里云 OSS、腾讯云 COS 等)即可获得独立访问网址。

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>
:root{
  --bg:#eef4ff;
  --card:#ffffff;
  --line:#e2e9f6;
  --pri:#3563e9;
  --pri-d:#2749b8;
  --pri-l:#e8efff;
  --ok:#11a86a;
  --text:#16203a;
  --muted:#6b7893;
}
*{margin:0;padding:0;box-sizing:border-box}
body{
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;
  background:var(--bg);color:var(--text);line-height:1.75;-webkit-font-smoothing:antialiased;
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:34px 18px;
  position:relative;overflow-x:hidden;
}
a{color:inherit;text-decoration:none}

/* 背景装饰 */
.deco{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.deco i{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55}
.deco i:nth-child(1){width:380px;height:380px;background:#c3d8ff;top:-120px;left:-100px}
.deco i:nth-child(2){width:300px;height:300px;background:#c8f2de;bottom:-90px;right:-70px}
.deco i:nth-child(3){width:240px;height:240px;background:#ffe4c9;top:44%;right:12%}

/* 彩纸 */
.cf{position:fixed;top:-14px;width:9px;height:15px;opacity:.85;z-index:1;animation:fall linear infinite}
@keyframes fall{
  0%{transform:translateY(-20px) rotate(0);opacity:0}
  8%{opacity:.9}
  100%{transform:translateY(105vh) rotate(680deg);opacity:.15}
}

.card{
  position:relative;z-index:2;background:var(--card);border:1px solid var(--line);
  border-radius:24px;max-width:640px;width:100%;padding:0;overflow:hidden;
  box-shadow:0 26px 70px rgba(22,32,58,.13);
}

/* 顶部成功区 */
.top{text-align:center;padding:50px 34px 36px;background:linear-gradient(180deg,#f7faff,var(--card))}
.ok-ring{
  width:88px;height:88px;border-radius:50%;margin:0 auto 22px;position:relative;
  background:var(--pri-l);display:grid;place-items:center;
  animation:pop .55s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes pop{0%{transform:scale(.4);opacity:0}100%{transform:scale(1);opacity:1}}
.ok-ring::before{
  content:"";position:absolute;inset:-9px;border-radius:50%;border:2px solid var(--pri);
  opacity:.22;animation:ripple 2.4s ease-out infinite;
}
@keyframes ripple{0%{transform:scale(.86);opacity:.4}100%{transform:scale(1.3);opacity:0}}
.ok-ring svg{width:42px;height:42px}
.ok-ring path{
  stroke:var(--ok);stroke-width:3.4;fill:none;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:40;stroke-dashoffset:40;animation:draw .5s .3s ease forwards;
}
@keyframes draw{to{stroke-dashoffset:0}}
.top h1{font-size:clamp(24px,4.2vw,32px);font-weight:900;margin-bottom:10px;letter-spacing:-.01em}
.top p{color:var(--muted);font-size:15px;max-width:400px;margin:0 auto}
.amt{
  display:inline-block;margin-top:20px;padding:9px 26px;border-radius:99px;
  background:var(--pri-l);color:var(--pri-d);font-weight:900;font-size:22px;letter-spacing:-.02em;
}

/* 订单信息 */
.info{padding:0 34px 6px}
.row{display:flex;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px dashed var(--line);font-size:14.5px}
.row:last-child{border-bottom:none}
.row span{color:var(--muted)}
.row b{font-weight:700;text-align:right}
.copy{color:var(--pri);font-size:12.5px;cursor:pointer;margin-left:8px;font-weight:600}
.copy:hover{text-decoration:underline}
.tag-ok{display:inline-block;padding:2px 11px;border-radius:99px;background:#e4f8ef;color:var(--ok);font-size:12px;font-weight:700}

/* 分割 */
.tear{position:relative;height:26px;margin:14px 0 6px}
.tear::before,.tear::after{
  content:"";position:absolute;top:50%;width:26px;height:26px;border-radius:50%;
  background:var(--bg);transform:translateY(-50%);
}
.tear::before{left:-13px}
.tear::after{right:-13px}
.tear hr{border:none;border-top:2px dashed var(--line);margin-top:12px}

/* 下一步 */
.next{padding:6px 34px 8px}
.next h3{font-size:15.5px;margin-bottom:14px;font-weight:800}
.steps{display:grid;gap:12px}
.st{display:flex;gap:13px;align-items:flex-start}
.st .n{
  width:26px;height:26px;border-radius:50%;background:var(--pri);color:#fff;flex-shrink:0;
  display:grid;place-items:center;font-size:12.5px;font-weight:800;margin-top:2px;
}
.st.done .n{background:var(--ok)}
.st .tx h4{font-size:14.5px;margin-bottom:2px}
.st .tx p{font-size:13px;color:var(--muted);line-height:1.65}

/* 按钮 */
.acts{padding:26px 34px 34px;display:flex;gap:12px;flex-wrap:wrap}
.b1,.b2{flex:1;min-width:150px;text-align:center;padding:14px 20px;border-radius:12px;font-size:15px;font-weight:700;transition:.25s}
.b1{background:var(--pri);color:#fff}
.b1:hover{background:var(--pri-d);transform:translateY(-2px);box-shadow:0 12px 26px rgba(53,99,233,.3)}
.b2{border:1px solid var(--line);color:var(--text)}
.b2:hover{border-color:var(--pri);color:var(--pri)}

.foot{padding:18px 34px;background:#f8fafe;border-top:1px solid var(--line);text-align:center;font-size:13px;color:var(--muted)}
.foot a{color:var(--pri);font-weight:600}

@media(max-width:520px){
  .top{padding:38px 22px 28px}
  .info,.next{padding-left:22px;padding-right:22px}
  .acts{padding:22px}
  .row{font-size:13.5px}
}
</style>
</head>
<body>

<div class="deco"><i></i><i></i><i></i></div>

<div class="card">
  <div class="top">
    <div class="ok-ring">
      <svg viewBox="0 0 48 48"><path d="M12 25l8.5 8.5L36 16"/></svg>
    </div>
    <h1>支付成功,感谢您的订单!</h1>
    <p>我们已收到您的付款,订单确认邮件将在几分钟内发送到您的邮箱。</p>
    <div class="amt">¥ 1,299.00</div>
  </div>

  <div class="info">
    <div class="row"><span>订单编号</span><b>SR20260802114812<span class="copy" onclick="this.textContent='已复制 ✓'">复制</span></b></div>
    <div class="row"><span>商品名称</span><b>Aurora One 主动降噪耳机 · 曜石黑</b></div>
    <div class="row"><span>支付方式</span><b>微信支付</b></div>
    <div class="row"><span>下单时间</span><b>2026-08-02 11:48</b></div>
    <div class="row"><span>订单状态</span><b><span class="tag-ok">已支付 · 待发货</span></b></div>
    <div class="row"><span>收货地址</span><b>浙江省杭州市西湖区文三路 * 号<br>沈女士 138****6621</b></div>
  </div>

  <div class="tear"><hr></div>

  <div class="next">
    <h3>接下来会发生什么</h3>
    <div class="steps">
      <div class="st done"><div class="n">✓</div><div class="tx"><h4>订单已确认</h4><p>付款已到账,系统已生成订单并锁定库存。</p></div></div>
      <div class="st"><div class="n">2</div><div class="tx"><h4>仓库打包出库</h4><p>预计 24 小时内完成质检与打包,节假日顺延。</p></div></div>
      <div class="st"><div class="n">3</div><div class="tx"><h4>物流配送</h4><p>发货后会短信推送快递单号,通常 2–4 天送达。</p></div></div>
      <div class="st"><div class="n">4</div><div class="tx"><h4>签收与售后</h4><p>支持 7 天无理由退换,整机 2 年质保。</p></div></div>
    </div>
  </div>

  <div class="acts">
    <a href="#" class="b1">查看订单详情</a>
    <a href="#" class="b2">继续逛逛</a>
  </div>

  <div class="foot">
    有任何疑问?联系客服 <a href="#">400-820-9981</a> 或 <a href="#">在线咨询</a>(9:00–21:00)
  </div>
</div>

<script>
// 彩纸动画
(function(){
  var colors=['#3563e9','#11a86a','#f5a524','#e5484d','#8b5cf6','#22c1c3'];
  for(var i=0;i<38;i++){
    var d=document.createElement('div');
    d.className='cf';
    d.style.left=Math.random()*100+'%';
    d.style.background=colors[Math.floor(Math.random()*colors.length)];
    d.style.animationDuration=(2.6+Math.random()*2.6)+'s';
    d.style.animationDelay=(Math.random()*2.2)+'s';
    if(Math.random()>0.6){d.style.borderRadius='50%';d.style.height='9px'}
    document.body.appendChild(d);
  }
})();
</script>
</body>
</html>

原创文章,作者:小蓝IT,如若转载,请注明出处:https://www.xiaolanzy.com/1792.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
比亚迪7月销售41.9万辆汽车:海外销量近18万辆再创历史新高
上一篇 19小时前
用户体验调研问卷 HTML 单页源码(多题型表单)
下一篇 4小时前

相关推荐

发表回复

登录后才能评论
分享本页
返回顶部