Files
html-tools/tools/date-diff/index.html
T
2026-01-01 22:03:12 +08:00

149 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<link rel="icon" href="../../favicon.svg">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>日期差值计算器 - JustHTMLs</title>
<link rel="canonical" href="https://www.htmls.dev/tools/date-diff/">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 900px;
margin: 0 auto;
}
.header {
text-align: center;
color: white;
margin-bottom: 30px;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
.card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
margin-bottom: 20px;
}
.card h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.5rem;
}
.card p {
color: #666;
line-height: 1.8;
margin-bottom: 15px;
}
.features {
list-style: none;
margin-top: 20px;
}
.features li {
padding: 10px 0;
color: #555;
border-bottom: 1px solid #eee;
}
.features li:before {
content: "✓";
color: #22c55e;
font-weight: bold;
margin-right: 10px;
}
.btn {
display: inline-block;
padding: 14px 30px;
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
color: white;
text-decoration: none;
border-radius: 10px;
font-weight: 600;
transition: all 0.3s;
margin: 10px 10px 10px 0;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.btn-secondary {
background: #6c757d;
}
.preview {
background: #f8f9fa;
border-radius: 12px;
padding: 20px;
}
.preview iframe {
width: 100%;
height: 450px;
border: none;
border-radius: 8px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>日期差值计算器</h1>
<p>计算两个时间点的差值</p>
</div>
<div class="card">
<h2>关于这个工具</h2>
<p>日期差值计算器支持日期与时间计算,输出多种维度的结果。</p>
<h2>功能特点</h2>
<ul class="features">
<li>计算天/小时/分钟/秒</li>
<li>支持时间交换</li>
<li>显示差值方向</li>
<li>本地计算无需上传</li>
</ul>
<div style="margin-top: 30px;">
<a href="app.html" class="btn">开始使用</a>
<a href="https://github.com/justhtmls/html-tools/tree/main/tools/date-diff" target="_blank" class="btn btn-secondary">查看源码</a>
<a href="../../index.html" class="btn btn-secondary">返回首页</a>
</div>
</div>
<div class="card">
<h2>快速预览</h2>
<div class="preview">
<iframe src="app.html" loading="lazy"></iframe>
</div>
</div>
</div>
<script src="../../assets/clicks.js" defer></script>
</body>
</html>